$(idStr).bind("plotselected", function (event, ranges) {
console.log(ranges);
plot_base = a_charts.findBindingPlot('#'+$(this).attr('id'));
console.log(plot_base);
if(plot_base !== null && plot_base !== undefined)
{
plot = $.plot(plot_base.chart_id, plot_base.chart_data, plot_base.chart_settings);
$.each(plot.getXAxes(), function(_, axis) {
var opts = axis.options;
opts.min = ranges.xaxis.from;
opts.max = ranges.xaxis.to;
console.log(opts);
});
plot.setupGrid();
plot.draw();
plot.clearSelection();
}
});
After:
This portion is directly inherited from flotcharts.org's example's. (well without the console.log()).
$.each(plot.getXAxes(), function(_, axis) {
var opts = axis.options;
opts.min = ranges.xaxis.from;
opts.max = ranges.xaxis.to;
console.log(opts);
});
plot.setupGrid();
plot.draw();
plot.clearSelection();
Commenting out any piece of that, and the chart fails to re-render zoomed in, with exception of
clearSelection which clears out the selection I've made. Otherwise the selection remains. Though you are correct in the sense that short of some voodoo somewhere its hard to make out how exactly opts actually ties in, but it does.