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

0
0

When I insert a series of data (more than 100 data)into the graph, the application crashes
Source code is as follows

    ma5Series.insertRange(0,date,ma5Y);
    ma10Series.insertRange(0,date,ma10Y);
    ma20Series.insertRange(0,date,ma20Y);
    macdSlowSeries.insertRange(0,date,macdFast,macdSlow);
    macdSignalSeries.insertRange(0,date,macdSignal);

The error is as follows

java.lang.UnsupportedOperationException: Data has been changed to a DataSeries which is unsorted in the X-Direction. Unsorted data can have severe performance implications in SciChart.

For maximum performance, please double-check that you are only inserting sorted data to SciChart. Alternatively, to disable this warning and allow unsorted data, please call dataSeries.setAcceptsUnsortedData(true).

I set up “dataSeries.setAcceptsUnsortedData (true)”, but still reported wrong.
how to solve it?

Version
2.0.0.1884
  • You must to post comments
0
0

Hi Huang,

Are you sure that you set AcceptsUnsortedData for all data series which contain unsorted data? As I see you have multiple data series instances so maybe you didn’t set AcceptsUnsortedData = true for one of them? I’m asking because the exception about unsorted data should be thrown only if data series instance contains unsorted data in X direction and its AcceptsUnsortedData = false.

If you checked your code and you’re sure that all data series with unsorted data have AcceptsUnsortedData = true then I want to ask you to post an example which reproduces this issue so I can debug it on my PC.

Best regards,
Yura

  • You must to post comments
0
0

I checked again and found that there was a missing place and the problem was solved

  • Yura Khariton
    Hi Huang. I’m very glad that issue is resolved.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.