jfox3721 Posted July 17, 2008 Report Share Posted July 17, 2008 I have added a chart to my winform in VB.NET 2008 using the wizard and I selected the 'MultiSeries' option because I plan on dynamically adding different number of series depending on user input. In design mode the chart, by default, has three series present. When I go into the 'Series' property and delete any of the series and click 'OK' it will automatically go back to having three. This same behavior is effecting my code when dynamically adding new series. How do I prevent this 'forced series' problem from happening? MultipleCallBacks.zip Quote Link to comment Share on other sites More sharing options...
Frank Posted July 17, 2008 Report Share Posted July 17, 2008 The number of series is determined by the data: chart,Opendata(COD.Values,numberOfSeries,numberOfPoints); Or if you are databinding your chart, the umber of series is inferred from the datasource. Quote Link to comment Share on other sites More sharing options...
jfox3721 Posted July 17, 2008 Author Report Share Posted July 17, 2008 So do I need to call the chart.opendata command before configuring my series? As of now, I do the following Chart1.Series.Clear For i as integer = 0 to numberOfSeries-1 Dim newSeries as new SeriesAttributes ...configure series Chart1.Series.add Next Chart1.OpenData(COD.Values, numberOfSeries,numberOfPoints) ...add data for each series Chart1.CloseData(COD.Values) Quote Link to comment Share on other sites More sharing options...
alag20 Posted August 15, 2008 Report Share Posted August 15, 2008 So do I need to call the chart.opendata command before configuring my series? As of now, I do the following Chart1.Series.Clear For i as integer = 0 to numberOfSeries-1 Dim newSeries as new SeriesAttributes ...configure series Chart1.Series.add Next Chart1.OpenData(COD.Values, numberOfSeries,numberOfPoints) ...add data for each series Chart1.CloseData(COD.Values) You can simply open the COD values and the series should be created automatically. Atleast thats what happens in 6.2 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.