Articles in this section
Category / Section

How to add data to the Chartcontrol?

1 min read

 

After placing the Charcontrol from the toolbar, ChartSeries class must be declared and points can be added to that series using Add method. Finally the series would to added to the Chartcontrol class. By default, colum chart would be displayed.

C#

ChartSeries series = this.chartControl1.Model.NewSeries("Series 1");

series.Points.Add(1, 410);

series.Points.Add(2, 420);

series.Points.Add(3, 430);

series.Points.Add(4, 440);

series.Points.Add(5, 450);

this.chartControl1.Series.Add(series);

VB

Dim series As ChartSeries = Me.chartControl1.Model.NewSeries("Series1")

series.Points.Add(1, 410)

series.Points.Add(2, 420)

series.Points.Add(3, 430)

series.Points.Add(4, 440)

series.Points.Add(5, 450)

Me.chartControl1.Series.Add(series)

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied