Issue #119 open

optionally hide raw data when using preDrawSeriesHooks

created an issue


we've developed a new plugin, moving average, for jqplot. on some of the graphs we would like to hide the raw data and only show the moving average.

we have two choices:

hide the original series in the preDrawSeriesHooks. this works well, but then the addLegendRowHooks is not being called any more

apply the moving average to the data series before passing it to jqplot. this would work as well. i guess this would be our option for now.

the feature request is as follows:

call addLegendRowHooks even if the series is disabled as a plugin may have disabled the series after adding additional value.

make this configurable so that one could enable the plugin and disable the series, eg. :

{{{ graphSeries = { show:false, movingAverage: {show:true, label:'Test'} } }}}

any other options we may consider?

Comments (6)

  1. Chris Leonello repo owner

    I can modify the code so that addLegendRow is called even if series is not shown. That is a good idea in general.

    For having separate configuration arguments to your plugin, I don't think I need to change anything. Your plugin could hook into the postParseSeriesOptionsHooks and parse out any options it needs at that point.

    Let me know if I've understood correctly.

  2. roelof reporter

    hi chris,

    i am already using postParseSeriesOptionsHooks and that is working great. as for the 2nd request; i was hoping that one would not need have to hide the original series in the plugin, i.e. that it could be done in a generic fashion. having said that, that is not such a big deal, as we could add an option to the plugin to choose whether to hide the original data or not.

    thanks for the quick response and looking forward to the next release!

    btw, feel free to use the attached moving average plugin in any way you see fit.

  3. Log in to comment