In Swift; display graph is slow when calling sChart with big series


#1

Hi all

I found that the following func sChart(_ chart: ShinobiChart, dataPointAt dataIndex: Int, forSeriesAt seriesIndex: Int) -> SChartData {
is slow

I have 4 series with more than 2000 items
and for each series is called .

Is there any other way to display a graph in Shinobi, with faster than sChart?

Thank you.


#2

Hi Corinne,

If you wish to cut down on the number of times we ask you for a series’ data points you could use the SChartDatasource method “sChart:dataPointsForSeriesAtIndex:” instead.

This method is called once per series where you return an array of all the data points you want the series, at the index provided, to be displayed.

Let me know if you have any questions.

Kind regards,
Andrew Polkinghorn.