赞
踩
用到两个库System.Windows.Controls.DataVisualization.Toolkit.dll 和WPFToolkit.dll
定义两个命名空间
xmlns:dc="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
xmlns:dv="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
<dc:Chart >
<dc:Chart.Series></dc:Chart>
另外还有:
BubbleSeries,LineSeries,PieSeries
ColumnSeries series = chart.Series[0]
series .ItemsSource =
new KeyValuePair<string, int>[] {
new KeyValuePair<string,int>("男",1),
new KeyValuePair<string,int>("女",2),
new KeyValuePair<string,int>("aaa",333),
};
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。