I’m working with Shinobicharts in iOS, and I have a chart that loads 4 series with 2500 datapoints in each series. This takes around 11 seconds on my iPhone 6, but I need it to go faster. Is there any way to load these 4 series asynchrounously? Right now I’m loading them by using a switch-statement for each series, but I’m sure there must be another way?
There are a few potential options you could look into to make things work a bit more smoothly.
Try to limit the amount of work being done in the chart data source’s data point loading method. If you are creating data points, calculating values, or extracting data from some external source you can try doing this up-front as soon as you have the data, rather than doing it when the chart requests a data point.
There is a property on ShinobiChart called
loadDataInBackground. Setting this to
YESallows our charts to use a background thread to load the data. This should leave your UI responsive whilst the data loads rather than freezing up.
The method appendNumberOfDataPoints:toEndOfSeriesAtIndex: on ShinobiChart allows you to gradually load and render data. Only the appended data is rendered (the pre-existing data does not re-render). This might allow you to start with a small amount of data that loads quickly and gradually build up your chart.
I hope the above suggestions are useful! Add a comment if you have any comments or queries on this :-)