I am displaying a time series and providing different data sources depending on the zoom level on the X axis. So as the user zooms in the chart, I provide more data points to get a finer-grained chart. And I do the opposite when the user zooms out.
This works very well, except that I can't get axis reloading (or not) working properly.
Here's how I do it:
- (void)sChartDidFinishZooming:(ShinobiChart *)chart
if( needsToSwitchDataset )
// chart.autoCalculateAxisRanges = NO;
If I don't set autoCalculateAxisRanges to NO (commented line in my example), the X axis resets to its initial range after reloading the data. If I do set it to NO, the X axis range is preserved just as I want it. However, the Y axis does not adjust to the new data.
Is there a way to set auto calculation of axis range on a per-axis basis instead of the whole chart? If not, what would be the best way to preserve the X axis range after zooming?