Pre loader

DataSeries, Append and Chart Redrawing

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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

Images
  • You must to post comments
0
0

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

  • Andreas Mueller-Bluemlein
    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 to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies