Dundas Learning Series -- [02] chart for. net

Source: Internet
Author: User

 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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.