Chart Controls for WPF ship in the Toolkit

We posted previously about the development of the WPF chart controls.  With the release of the June WPF Toolkit you now have the controls at your fingertips.  You can make bar, pie, bubble, scatter and line graphs.   Check out this blog post for details!

image Here’s the code for the image above:

Add a reference to the System.Windows.Controls.DataVisualization.Toolkit assembly in your project, add the namespace for the Charting controls, add a chart in XAML and add some data in code behind.  Instant pie chart!


<Window x:Class=”WpfChartControl.Window1″





    Title=”Window1″ Height=”300″ Width=”300″>


        <charting:Chart x:Name=”chart” Width=”350″ Height=”250″>


                <charting:PieSeries ItemsSource=”{Binding}”



                    Title=”Pet Preference” IsSelectionEnabled=”True” />






chart.DataContext = new KeyValuePair<string, int>[] {

                                    new KeyValuePair<string, int>(“Dog”, 30),

                                    new KeyValuePair<string, int>(“Cat”, 25),

                                    new KeyValuePair<string, int>(“Rat”, 5),

                                    new KeyValuePair<string, int>(“Hampster”, 8),

                                    new KeyValuePair<string, int>(“Rabbit”, 12) };


chart.DataContext = New KeyValuePair(Of String, Integer)() _

                                {New KeyValuePair(Of String, Integer)(“Dog”, 30), _

                                 New KeyValuePair(Of String, Integer)(“Cat”, 25), _

                                 New KeyValuePair(Of String, Integer)(“Rat”, 5), _

                                 New KeyValuePair(Of String, Integer)(“Hampster”, 8), _

                                 New KeyValuePair(Of String, Integer)(“Rabbit”, 12)}


Comments (7)

  1. Pawel says:

    Perfect – I was looking for simple and ready to use example of WPF charting something about 2 days – and it solved my problem in 5 minutes (or less 🙂 )

    Nice and simple – thanks

  2. N.SrikanthReddy says:


    After i saw your presentation about the charts, i am so much attracted. when i started working windows application i did't find "System.Windows.Controls.DataVisualization.Charting assembly"

    How can i get the assembly reference.


    Srikanth Reddy.N

  3. Sandeep M says:

    Hi Srikanth,

                   The assembly can be found under Program FilesWPFToolKit directory. Hope this helps.



  4. Riketa says:

    I am not able to find it under ProgramFilesWPFToolkit.

    Can you please help me out with this problem?

  5. vJ says:

    C:Program Files (x86)Microsoft Chart ControlsAssemblies

  6. bg says:

    how can i add the datapoints dynamically to the line series?

  7. Robert Dede says:

    When researching for mission critical wpf charts with more speed, features, intelligent rendering, ease of use, see among others and compare.