Mschart application.

Source: Internet
Author: User

I have never touched on this before. The project needs to be quickly learned.

1. Let's take a rough look at the attributes.

2. Take a few examples to familiarize yourself with the process.

3. Be familiar with several binding methods.

When you do this, you can refer to the example (mschart has a project, which contains many examples). The main reason is its flexible use of attributes.

There are many binding methods. below is myCodeAnd chart image:

 Datatable dt  =     New  Datatable ();
DT = Dbmanager. dbhelper. executedataset (SQL );
Dataview dv = DT. defaultview;

// X axis name
Arraylist arraylistx = New Arraylist ();
Foreach (Datarow row In DT. Rows)
{
Arraylistx. Add (row [ 0 ]. Tostring () + " ( " + Row [ 1 ]. Tostring () + " ) " );
}
// Y axis name
Arraylist arraylisty = New Arraylist ();
Foreach (Datarow row In DT. Rows)
{
Arraylisty. Add (row [ 1 ]. Tostring ());
}
// Displays the Y value of each data point.
// Chart3.series ["Series1"]. isvalueshownaslabel = true;
Chart3.series [ " Series1 " ]. Points. databindxy (arraylistx, arraylisty );
// Actual chart type: seriescharttype. Pie. This is a pie chart.
Chart3.series [ " Series1 " ]. Charttype = Seriescharttype. Pie;

Chart3.series [ " Series1 " ] [ " Pielabelstyle " ] = " Disabled " ;

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.