ShiboBrady / flot

Automatically exported from code.google.com/p/flot
MIT License
0 stars 0 forks source link

drawSeriesPost hook #670

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I wouldn't mind having a hook that runs after a series is drawn but before the 
main draw hook is executed.

I am using it to manipulate the color of data points.  It can be done in the 
main draw hook but feels like it should be configurable on the individual 
series not the main draw.

Here's the changes I made in my local copy:

*** libs/jquery.flot.js 2012-02-15 15:50:37.729407474 -0600
--- jquery.flot.custom.js   2012-02-15 10:59:42.732860221 -0600
***************
*** 153,158 ****
--- 153,159 ----
              processRawData: [],
              processDatapoints: [],
              drawSeries: [],
+             drawSeriesPost: [],
              draw: [],
              bindEvents: [],
              drawOverlay: [],
***************
*** 1455,1460 ****
--- 1456,1462 ----
              for (var i = 0; i < series.length; ++i) {
                  executeHooks(hooks.drawSeries, [ctx, series[i]]);
                  drawSeries(series[i]);
+                 executeHooks(hooks.drawSeriesPost, [ctx, series[i]]);
              }

              executeHooks(hooks.draw, [ctx]);

Original issue reported on code.google.com by dds1...@gmail.com on 15 Feb 2012 at 9:55

GoogleCodeExporter commented 8 years ago

Original comment by dnsch...@gmail.com on 1 May 2012 at 10:29

GoogleCodeExporter commented 8 years ago

Original comment by dnsch...@gmail.com on 7 May 2012 at 5:42