Going to beta7 of Chartjs, this version is introducing new hooks on plugin in order to manage better the life cycle of plugins.
I would suggest to move the logic
- from
beforeInit and afterInit to start hook.
- from
destroy to stop hook.
Doing that, you could add the feature to disable and enable the plugin at runtime, during chart lifecyle.
If it makes sense, I can propose the change by PR.
Going to beta7 of Chartjs, this version is introducing new hooks on plugin in order to manage better the life cycle of plugins.
I would suggest to move the logic
beforeInitandafterInittostarthook.destroytostophook.Doing that, you could add the feature to disable and enable the plugin at runtime, during chart lifecyle.
If it makes sense, I can propose the change by PR.