SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
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?
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.
Please login first to submit.