Limit zooming on basic line chart with daterange axis


#1

I have about 5 points per day going back about a year. I’ve created handlers for the user to switch the daterange from 5day, 1 month, 3 months, and 6months.  I would like to limit the pinch zoom and doubletap zoom capabilities so that the the user cannot zoom in further than a 5 day range. Basically, I would like to know if allowPanningOutOfMaxRange  has a comparable function to allow zooming beyond frequency.

Current code is here. startDate and Enddate are 3 months.

SChartDateRange *r = [[SChartDateRange alloc] initWithDateMinimum:startDate andDateMaximum:endDate];

// limits navigation of daterange
schart.xAxis.allowPanningOutOfMaxRange = NO;

schart.xAxis = [[SChartDateTimeAxis alloc] initWithRange:r];

#2

Self solved after some googling. This will limit the chart xAxis frequency no matter how far you zoom in to 1 day intervals.

schart.xAxis.minorTickFrequency = schart.xAxis.majorTickFrequency = [SChartDateFrequencydateFrequencyWithDay:1];