PieSeries饼图怎么绑定数据?
<toolkit:Chart Name="cr_ProductShow" Title="市场占有率">
<toolkit:Chart.Series>
<toolkit:PieSeries DependentValueBinding="{Binding }" IndependentValueBinding="{Binding }"/>
</toolkit:Chart.Series>
</toolkit:Chart>
数据绑定
private void Chartcontrol_Loaded(object o, RoutedEventArgs e)
{
List<KeyValuePair<string, int>> Companys = new List<KeyValuePair<string, int>>();
Companys.Add(new KeyValuePair<string, int>("宝锶", 1000));
Companys.Add(new KeyValuePair<string, int>("华为", 200));
Companys.Add(new KeyValuePair<string, int>("三星", 600));
Companys.Add(new KeyValuePair<string, int>("Apple", 100));
Companys.Add(new KeyValuePair<string, int>("Nokia", 50));
Companys.Add(new KeyValuePair<string, int>("HTC", 300));
((System.Windows.Controls.DataVisualization.Charting.PieSeries)cr_ProductShow.Series[0]).ItemsSource = Companys;
}

为什么右边那里有数据显示,但是饼图呢?是不是好要用个什么属性来显示?
还有个请况就是:
我改成
DependentValueBinding="{Binding Key}" IndependentValueBinding="{Binding Value}"
的时候,运行空白,页面全空白,什么情况?
谢谢啦
相关推荐
wpf中插入百度地图
wpf中加载web地图百度地图的方法,自定义饼图。wpf中加载web地图百度地图的方法,自定义饼图。
WPF饼图与柱状图数据可视化实战项目
数据可视化在现代软件开发中扮演着至关重要的角色,尤其是在企业级应用、数据分析平台和仪表盘系统中。WPF(Windows Presentation Foundation)凭借其强大的图形渲染引擎,支持硬件加速的矢量图形、丰富的动画系统和灵活的数据绑定机制,成为构建高交互性可视化界面的理想平台。其与MVVM模式的天然契合性,使得UI与业务逻辑解耦更加彻底,便于维护与测试。
FlexChart使用教程
Macromedia Flash是强大的矢量动画编辑工具,在做动画起家之后,Flash一直在谋求RIA(rich internet application)富客户端的霸主地位,最有影响的是,已经推出了面向对象的编程脚本ActionScript3.0,并且建立起类似于java swing的类库和相应component(组件)。Flex是通过java或者.net等非Flash途径,解释.mxml文件组织components,并生成相应的.swf文件。Flex的component和flash的component很相似,但是有所改进增强。目前Macromedia公司已经被ADOBE公司收购。当前(2008年10月)的flex版本为3.0 。
QT QChart QPieSeries 空心饼图中显示文字
QT QChart 写的空心饼图,饼图中心显示百分比文字。https://blog.csdn.net/xiezhongyuan07/article/details/82684118
具有数据绑定支持的WPF饼图
本文介绍了使用数据绑定的交互式饼图的开发。


图表区
