Commit b9c6359c authored by soenter's avatar soenter

Improve the performance of large data processing

parent e2147c07
...@@ -67,12 +67,14 @@ ...@@ -67,12 +67,14 @@
var zoom = $("#zoom").attr("checked"); var zoom = $("#zoom").attr("checked");
if (zoom) { if (zoom) {
plot = $.plot(placeholder, data, $.extend(true, {}, options, { $.each(plot.getXAxes(), function(_, axis) {
xaxis: { var opts = axis.options;
min: ranges.xaxis.from, opts.min = ranges.xaxis.from;
max: ranges.xaxis.to opts.max = ranges.xaxis.to;
} });
})); plot.setupGrid();
plot.draw();
plot.clearSelection();
} }
}); });
......
...@@ -93,12 +93,14 @@ ...@@ -93,12 +93,14 @@
// do the zooming // do the zooming
plot = $.plot("#placeholder", [d], $.extend(true, {}, options, { $.each(plot.getXAxes(), function(_, axis) {
xaxis: { var opts = axis.options;
min: ranges.xaxis.from, opts.min = ranges.xaxis.from;
max: ranges.xaxis.to opts.max = ranges.xaxis.to;
} });
})); plot.setupGrid();
plot.draw();
plot.clearSelection();
// don't fire event on the overview to prevent eternal loop // don't fire event on the overview to prevent eternal loop
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment