1

Does somebody know how to create a chart by code? C#, Visual Studio 2010. (Form application)If i use the "drag" method (if i add manually) the generated code is

private System.Windows.Forms.DataVisualization.Charting.Chart chart1;

but when i'm trying to use the same thing just don't work. I cant find out witch witch "using" should i use. It looks like "System.Windows.Forms.DataVisualization" doesn't exist.

3 Answers 3

5

You need the actual .DLL of the datavisualization. You need to download the .dll from Microsoft or should be in there. Try compiling the project.

Sign up to request clarification or add additional context in comments.

1 Comment

You need to import the dll and reference the dll and then do like Chart _chart = new Chart();. Try compiling your project.
1

You have to add a assembly reference to System.Windows.Forms.DataVisualization. Then you can write:

private System.Windows.Forms.DataVisualization.Charting.Chart _MyChart;

or

using System.Windows.Forms.DataVisualization.Charting;
private Chart _MyChart;

Comments

0

You can have a look at FusionCharts.

It is a JavaScript charting library. However, they provide a .dll file that you can import in your Visual Studio project and auto-generate the HTML + JavaScript code.

Here is a tutorial series from their blog.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.