Drawing scatter point plot in wpf application

Tan, Thuan Seah 20 Reputation points

Does Microsoft have an official control for drawing scatter plot? I did a search and System.Windows.Controls.DataVisualization.Toolkit seems to come up a fair bit but I couldn't seem to find where to download this library. Is my best bet to use the System.Windows.Forms.DataVisualization one if I don't want to rely on 3rd party libraries?

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
9,440 questions
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
709 questions
0 comments No comments
{count} votes

Accepted answer
  1. Hui Liu-MSFT 23,066 Reputation points Microsoft Vendor

    Hi,@Tan, Thuan Seah. Welcome Microsoft Q&A.

    Microsoft does not have an official control for drawing scatter plots in WPF. The System.Windows.Controls.DataVisualization.Toolkit library you mentioned package only contains assemblies for the .NET Framework 4.0 Client Profile. Therefore, it is not compatible with any version of .NET Core.

    Since this package is not an official Microsoft package and there are no updates for .NET Core

    If you prefer not to use third-party libraries, you could use the System.Windows.Forms.DataVisualization library as Castorix31 said, which is part of the .NET Framework and includes a Chart control that can be used to draw scatter plots.

    First, add references to the following assemblies to your WPF project.

    • System.Windows.Forms.DataVisualization
    • System.Windows.Forms.DataVisualization.Design
    • System.Windows.Forms
    • WindowsFormsIntegration


    <Grid x:Name="grid">


    using System.Windows;
    using System.Windows.Forms.DataVisualization.Charting;
    namespace WpfApp3
        public partial class MainWindow : Window
            Chart chart1 = new Chart();
            public MainWindow()
                System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost();
                chart1.Titles.Add(" Chart");
                host.Child = chart1;
            public Chart draw()
                ChartArea ChartArea1 = new ChartArea();
                this.chart1.Series[0].Points.AddXY(1, 5);
                this.chart1.Series[0].Points.AddXY(2, 4);
                this.chart1.Series[0].Points.AddXY(3, 3);
                this.chart1.Series[0].Points.AddXY(4, 2);
                this.chart1.Series[0].Points.AddXY(5, 1);
                return chart1;

    The result:

    User's image

    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Castorix31 79,746 Reputation points
    0 comments No comments