I have a line graph with a pannable/zoomable Y-axis and a non-user-alterable X-axis. I’d like the X-axis to automatically pan and zoom to show as much data as possible as the user moves around on the Y-axis. That is, given a graph like this:
Zooming in to 1-2 on the Y-axis would cause the X-axis to scale to something like this:
What’s the best way to go about this? It occurs to me that I can use setRangeWithMinimum:andMaximum: to move the axis around in reaction to sChartDidFinishZooming:/sChartDidFinishPanning: but do I have to go all the way back out to my datasource to determine the min/max based on the new Y-axis range?