SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

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 withfor (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.