rajui Posted May 20, 2010 Report Share Posted May 20, 2010 Am having a series on Line graph want to add another series to a graph when the user selects a checkbox which i have provided above the graph when the user selects the check box i fetched a dataset from DB which contains datapoints. with this dataset i want to crate an other series on the graph Quote Link to comment Share on other sites More sharing options...
RandyJ Posted July 30, 2010 Report Share Posted July 30, 2010 Hi, To add a series dynamically you first need to increase the number of series: chart.Data.Series++; The Series Attributes collection is automatically synchronized with the number of series in the data. Then you will have to add the items in the collection: Example: for (int i = 0; i < chart1.Data.Points; i++) { chart1.Data[newSeries, i] = ran.NextDouble() * 100; } Hope this helps. Regards, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.