danvk / dygraphs

Interactive visualizations of time series using JavaScript and the HTML canvas tag
http://dygraphs.com
Other
3.17k stars 606 forks source link

Allow custom options to use in plotters #938

Open olivier-monaco opened 6 years ago

olivier-monaco commented 6 years ago

I would like to give options to one of my plotter but giving a non declared option to Dygraph throw an exception (only once so one chart does not work but others in the same page work). I found no way to extends the OPTIONS_REFERENCE array. Is there a way?

This could be usefull for smoothPlotter, for example, to have different smoothing option for each chart in a page.

olivier-monaco commented 6 years ago

Current work around is to comment the following line in DygraphOptions.prototype.warnInvalidOption_:

        throw "invalid option " + optionName;