当前位置:   article > 正文

WPF ToolKit Chart_system.windows.controls.datavisualization.toolkit.

system.windows.controls.datavisualization.toolkit.dll

用到两个库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:ColumnSeries x:Name="chart" Title="title" IndependentValueBinding="{Binding Path=Key}"
                             DependentValueBinding="{Binding Path=Value}" />
            </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),
                };

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/270701?site
推荐阅读
相关标签
  

闽ICP备14008679号