user3420653 user3420653 - 16 days ago 8
C# Question

C# add chart error DataVisualization.Charting - Visual Studio

I'm trying to use Charts to create graphs in Visual Studio 2012. I have .Net 4.0
But when write this:

using System.Windows.Forms.DataVisualization.Charting;


i get an error:

The type or namespace name 'DataVisualization' does not exist in the namespace 'System.Windows.Forms'

How can i solve this?

Thanks!

Answer

Add reference to the System.Windows.Forms.DataVisualization in the Solution Explorer panel.