0

I have downloaded the Charting with Data Visualization Toolkit from Nuget, DotNetProjects.WpfToolkit.DataVisualization in Visual Studio 2019 Pro.

The articles that I have found instruct loading the System.Windows.Controls.DataVisualization reference.Cant not find it???

I can find DotNetProjects.Controls.DataVisualization.Toolkit, but any example adding Charts to my XAML code fail.This is what I am trying, unsuccessfully however....

xmlns:dvc="clr-namespace:DotNetProjects.DataVisualization.Toolkit;assembly=DotNetProjects.DataVisualization.Toolkit"

        <TabItem Header=" Chart">
            <dvc:Chart Name="MyChart" Width="400" Height="250" Background="YellowGreen">
            </dvc:Chart>
        </TabItem >

2 Answers2

0
    xmlns:lrm="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=DotNetProjects.DataVisualization.Toolkit"

<lrm:Chart x:Name="myChart" Width="500" Height=" 500" Title="Gary"/>

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 18 '23 at 17:52
0
   PointCollection pc = new PointCollection();

    for (int i = 0; i < 100; i++)
    {
        pc.Add(new System.Windows.Point { X = i, Y = i * 2 });
    }

    LineSeries series1 = new LineSeries();
    series1.DependentValuePath = "Y";
    series1.IndependentValuePath = "X";
    series1.ItemsSource = pc;
    chart1.Series.Add(series1);
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 20 '23 at 23:12