Group: Forum Members
Last Active: 14 Years Ago
Posts: 2,
Visits: 1
|
I have bound a chart control to a data table. Every two seconds a new X and Y value are added to the data table and the chart updates. After about 120 seconds, the X axis labels start to behave erratically. The labels will go from 0 to 120 then they will go to 0 to 75 then back to 0 to 120. This will continue and every so often the labels will be correct, but then they go back to changing randomly. The labels will not stop at 120; they will continue to go higher as long as more values are added to the data table, but the labels behave erratically after about 120 seconds.
I am sending the data to the chart in the same way that I did when using Chart Q2 2006 and I never had any problems with the X axis labels.
The following code is used to set the parameters of the X axis:
Dim primaryX as NAxis = chart1.Axis(StandardAxis.PrimaryX) Dim linearScaleX as New NLinearScaleConfigurator primaryX.ScaleConfigurator = linearScaleX
I don't know if I'm doing something wrong or if there is an issue with the chart control.
Thank you,
George Coppens
Edit: I have created a small test program and I can't duplicate the error. There must be a problem with the original program.
|
Group: Forum Members
Last Active: 6 Months Ago
Posts: 153,
Visits: 11
|
Hi George, Can you post the complete code of the program for review? Generally when you apply a linear scale it will denote the X values of the series - if you do not specify X values explicitly the control generates automatic values starting from 0. Using the code below cannot make the labels go back to 75 when you have more than a 120 data points so it must be something else in the configuration - you can also send me control state for review - you can do that with the following line of code: NChartControl1.Serializer.SaveControlStateToFile( "c:\\chartstate.xml", Nevron.Serialization.PersistencyFormat.XML, null);Also what is the version you're currently using? Best regards, Bob
|
Group: Forum Members
Last Active: 14 Years Ago
Posts: 2,
Visits: 1
|
Bob,
I was using NChartControl1.DataBindingManager.UpdateChartControl() to update the chart after new data was added to the data table. This line of code was not needed and the X axis label problem went away once the code was removed.
I am using the latest version of Chart.
Thank you,
George
|