Lines Matching refs:plot
1 /* Flot plugin for adding the ability to pan and zoom the plot.
7 to pan. The plugin defines plot.zoom({ center }), plot.zoomOut() and
8 plot.pan( offset ) so you easily can add custom controls. It also fires
31 interactive for pan, then you'll have a basic plot that supports moving
40 "frameRate" specifies the maximum number of times per second the plot will
42 intermediate pans, the plot will then not update until the mouse button is
58 plot = $.plot(...);
61 plot.zoom({ center: { left: 10, top: 20 } });
64 plot.zoomOut({ center: { left: 10, top: 20 } });
67 plot.zoom({ amount: 2, center: { left: 10, top: 20 } });
70 plot.pan({ left: -100, top: 20 })
126 function init(plot) {
128 var c = plot.offset();
132 plot.zoomOut({ center: c });
134 plot.zoom({ center: c });
149 var c = plot.getPlaceholder().css('cursor');
152 plot.getPlaceholder().css('cursor', plot.getOptions().pan.cursor);
158 var frameRate = plot.getOptions().pan.frameRate;
163 plot.pan({ left: prevPageX - e.pageX,
178 plot.getPlaceholder().css('cursor', prevCursor);
179 plot.pan({ left: prevPageX - e.pageX,
183 function bindEvents(plot, eventHolder) {
184 var o = plot.getOptions();
197 plot.zoomOut = function (args) {
202 args.amount = plot.getOptions().zoom.amount;
205 plot.zoom(args);
208 plot.zoom = function (args) {
213 amount = args.amount || plot.getOptions().zoom.amount,
214 w = plot.width(), h = plot.height();
232 $.each(plot.getAxes(), function(_, axis) {
271 plot.setupGrid();
272 plot.draw();
275 plot.getPlaceholder().trigger("plotzoom", [ plot, args ]);
278 plot.pan = function (args) {
289 $.each(plot.getAxes(), function (_, axis) {
319 plot.setupGrid();
320 plot.draw();
323 plot.getPlaceholder().trigger("plotpan", [ plot, args ]);
326 function shutdown(plot, eventHolder) {
327 eventHolder.unbind(plot.getOptions().zoom.trigger, onZoomClick);
336 plot.hooks.bindEvents.push(bindEvents);
337 plot.hooks.shutdown.push(shutdown);
340 $.plot.plugins.push({