1. Dundas Chart for. NET Framework.
This framework provides over200Detailed samples (there are more than 200 optical charts), complete with C # and VB. net Code, along with overviews and more, to ensure you are thoroughly familiar with Dundas Chart. net.
2. Basic chart Elements
Chart Elements
3. Simplest bar chart
Code
// 01 create a chart object
Chart chart = new chart ();
// 02 create a chartarea object
Chartarea = new chartarea ();
// 03 add chartarea to the chart object
Chart. chartareas. Add (chartarea );
// 04 create a series object
Series Series1 = new series ();
Series1.name = "Test details ";
// 05 create a point
Double [] db1 = {22 };
Double [] DB2 = {44 };
Datapoint dp1 = new datapoint ();
Dp1.xvalue = 1;
Dp1.yvalues = db1;
Datapoint dp2 = new datapoint ();
Dp2.xvalue = 2;
Dp2.yvalues = DB2;
// 06 add point
Series1.points. Add (dp1 );
Series1.points. Add (dp2 );
// 07 add Series1
Chart. Series. Add (Series1 );
// 08 define the header title
Title T = new title ();
T. Text = "I am the title, who are I afraid ";
T. Color = color. Red;
T. font = new font ("Times New Roman", 12, fontstyle. Bold );
T. Alignment = system. Drawing. contentalignment. bot1_enter;
Chart. Titles. Add (t );
// 09 define the coordinates of the display position
Chart. Location = new system. Drawing. Point (0, 0 );
// 10 chart size
Chart. size = new system. Drawing. Size (360,260 );
// 11 DISPLAY chart
This. Controls. addrange (new system. Windows. Forms. Control [] {chart });
Series1.type = seriescharttype. Pie;
Series1.type = seriescharttype. line;