Hi,
i have a problem with chart redrawing after the appending of new data. If i understand it correctly, charts update automatically after calling Append. However, if i add single pairs or arrays of data, that does not happen.
To reproduce this, just alter the SciChart WPF example. In LineChartExampleView.xaml.cs, i replaced
var data = DataManager.Instance.GetFourierSeries(1.0, 0.1); // Append data to series. SciChart automatically redraws series.Append(data.XData, data.YData); with double[] x = new double[100]; double[] y = new double[100]; for (int i = 0; i < 100; i++) { x[i] = i; y[i] = i; } series.Append(x, y);
The result after starting the demo and clicking “Create a basic chart” -> “Line chart” can be seen in attachment 1. It requires a left doubleclick to make all the data visible (attachment 2). Why does the chart not rescale and redraw automatically?
Thank you,
Robin
- Andreas Mueller-Bluemlein asked 11 years ago
- last edited 10 years ago
- You must login to post comments
Hi Robin,
Please, notice, that the VisibleRange is set explicitly in LineChartExampleView.xaml:
<SciChart:SciChartSurface Name="sciChart" SciChart:ThemeManager.Theme="Oscilloscope"> . . . . <SciChart:SciChartSurface.YAxis> <SciChart:NumericAxis VisibleRange="-4, 4" FlipCoordinates="True" GrowBy="0.5, 0.5" /> </SciChart:SciChartSurface.YAxis> . . . . </SciChart:SciChartSurface>
When you remove this property setting, the chart will behave as expected.
Please, fill yourself free to ask if you have more questions!
Best regards,
Yuriy
- Yuriy Zadereckiy answered 11 years ago
-
Hi Yuriy, you are right, removing the VisibleRange property helps, but... if we again replace the appending code snippet with for (int i = 0; i < 100; i++) { series.Append(i, i); } the problem persists, even without a visible range set. Best regards, Robin
- You must login to post comments
Please login first to submit.