Good question!
If you just want to manually reset the zoom on a plot, do this:
graph.resetZoom();
This resets axes scales as well as the cursors "isZoomed" property,
redraws the plot, and calls any "jqplotResetZoom" hooks.
If you are dynamically changing data and want to rescale the axes,
pass an options object to the replot() method setting "resetAxes:true":
graph.replot({resetAxes:true});
If you wanted to rescale only selected axes, you can pass in an array
like:
graph.replot({resetAxes:['xaxis', 'y2axis']})
or pass in an object like:
graph.replot({resetAxes:{xaxis:true, y2axis:true}})
If you are doing both, resetting zoom and replotting b/c data has
changed, you may want to do this:
graph.resetZoom();
graph.replot({resetAxes:true})
or this if you don't want the extra call to redraw() and any
jqplotResetZoom hooks:
graph.plugins.cursor._zoom.isZoomed = false;
graph.replot({resetAxes:true});
Let me know how this works for you.
--
Chris Leonello