Thanks Rob. That does indeed work beautifully.
I did, however, find a nasty bug with the DiscontinousDateTimeAxis and manual zooming using [chartAxis setZoom]. Please check the following code (this is more or less pseudo code, so please don't mind any spelling mistakes);
ShinobiChart *mainChart = [[ShinobiChartalloc] initWithFrame:frame];
SChartNumberAxis *yAxis = [[SChartNumberAxisalloc] init];
SChartDiscontinuousDateTimeAxis *xAxis = [[SChartDiscontinuousDateTimeAxisalloc] init];
// a time period that defines the weekends
SChartRepeatedTimePeriod* weekends = [[SChartRepeatedTimePeriodalloc] initWithStart:[selfdateFromString:@"02-01-2010"]
mainChart.xAxis = xAxis;
mainChart.yAxis = yAxis;
The following code goes into a pinch gesture recognizer;
[chartAxis setZoom:value fromPosition:&dateInterval withAnimation:NOandBounceLimits:YES];
The bug seems to be related with the excludedRepeatedTimePeriods. In case I comment our that like (
[xAxis addExcludedRepeatedTimePeriod:weekends];),the zooming works as expected. In case I leave it in, it is seriously flawed, i.e. the chart doesn't zoom around the given position any more. I've tested this with the exact same values for "dateInterval" for both cases.
Please let me know if you need a demo project for this in order to replicate the error. The code I've presented here should suffice, though.
Since we're on it, are you guys looking into the issue with "andBounceLimits" not working? The bug is still very much present.