Set an alternate max range for axis


I have a usage scenario where the data is between a min and max level that a both positive. I want that as the default range, so that resetting zoom (e.g. with double-tap) will pin min and max to either end of the axis. This is simple with [SChartAxis setDefaultRange:].

Additionally I want to set an outer range from 0 to max which should limit the zoom-level and panning. SChartAxis has a maxRange, that is the union of the set default range and the true data range. I tried to set maxRange in a subclass of SChartAxis, but with no luck. 

Any suggestions on how to get the wanted behavior?


Sounds like you should set the default range to your desired 0-max range, disallow panning/zooming out of default range. Then disable the double tap resets zoom gesture and instead roll your own that will reset zoom to your desired range of min-max. And of course set the current axis range to the same min-max range when you first load the chart.