Plugins
Plugins can be shared between chart instances:
Plugins can also be defined directly in the chart config (a.k.a. inline plugins):
Plugins can be registered globally to be applied on all charts (a.k.a. global plugins):
Plugins must define a unique id in order to be configurable.
- can't start with a dot or an underscore
- can't contain any non-URL-safe characters
- can't contain uppercase letters
Plugin options
Plugin options are located under the options.plugins
config and are scoped by the plugin ID: options.plugins.{plugin-id}
.
Disable plugins
To disable a global plugin for a specific chart instance, the plugin options must be set to false
:
beforeInit
afterInit
beforeUpdate
(cancellable)afterUpdate
- (cancellable)
afterLayout
beforeDatasetsUpdate
(cancellable)afterDatasetsUpdate
beforeDatasetUpdate
(cancellable)afterDatasetUpdate
afterRender
beforeDraw
(cancellable)beforeDatasetsDraw
(cancellable)afterDatasetsDraw
beforeDatasetDraw
(cancellable)afterDatasetDraw
beforeEvent
(cancellable)afterEvent
resize