Sunday, 20 April 2014

How to use chart graph in window appliaction


                                                                                                                                        previous..
                                                                                                                                             Next..

Here i will explain how to use Chart Graph window application.

Step(1) : Form
Drag and down a chart graph and a button from tool box.

You can change properties  of this chart graph. Main property of this chart graph is "collection"
From this we set Graph as a X-axes and Y-axes. Here i am meking graph b/w Age and score.You can change color and background image.
Step(2) : Code
Click on button and write this code.

Private void Chart_btn_Click(object sender, Event args)
{
this.chart1.Series["Age"].Points.AddXY("max",33);
this.chart1.Series["Score"].Points.AddXY("max",93);

this.chart1.Series["Age"].Points.AddXY("carl",20);
this.chart1.Series["Score"].Points.AddXY("carl",70);

this.chart1.Series["Age"].Points.AddXY("mark",50);
this.chart1.Series["Score"].Points.AddXY("mark",56);

this.chart1.Series["Age"].Points.AddXY("Alli",40);
this.chart1.Series["Score"].Points.AddXY("Alli",30);

}
Step(3) : Run
Now run your application and click on button.
                                                                                                                                        previous..
                                                                                                                                             Next..

No comments:

Post a Comment

C# program Selection Sorting

Selection sort is a straightforward sorting algorithm. This algorithm search for the smallest number in the elements array and then swap i...