Plugin
Plugins are the most efficient way to customize or change the default behavior of a chart.
How to use plugins
Global registeration for plugins
Register for a chart instance
Unregister plugins
Use Chart.plugins.unregister(plugins)
to unregister a plug-in.
Clear plugins
Use Chart.plugins.clear()
to clear all the plugins.
Get registered plugins
Use Chart.plugins.getAll()
to get all successfully registered plug-ins.
How to define plugin
The implementation of a plugin is very simple, all you need to do is define the behaviors of the plugin during the life circle of the chart.
Available hooks
init
: After initialization of the chartbeforeGeomDraw
: Before drawing the geometryafterGeomDraw
: After drawing the geometrybeforeCanvasDraw
: before drawing the canvasclear
: Clear the chart, remove geometryclearInner
: Clear the layersrepaint
: Redraw
Last updated