I'm trying to add a chart that support live data with single line series - adding new point every few seconds.
When the users sees the last point, I need to keep update the range, evertytime a new point arrive, in order to show live progress.
I'm doing it by:
self.chart.xAxis?.defaultRange = SChartDateRange(dateMinimum: earlyDate, andDateMaximum: laterDate)
It works fine.
When the user scolls to the left, to see the history, I need to keep update the chart WITHOUT scrolling back to the newest point
However, after callnig to self.chart.reloadData()
The chart is scrolled back to the newest point
How can I keep update the graph and stay at the position where the user scrolled?
I saw that in Android, it is being done by setCurrentDisplayedRangePreservedOnUpdate
Thanks in Advance!