Plugins can be registered globally to be applied on all charts (a.k.a. *global plugins*):
```javascript
-Chart.plugins.register({
+Chart.register({
// plugin implementation
});
```
To disable a global plugin for a specific chart instance, the plugin options must be set to `false`:
```javascript
-Chart.plugins.register({
+Chart.register({
id: 'p1',
// ...
});
});
```
- ## Plugin Core API
+## Plugin Core API
Read more about the [existing plugin extension hooks](../jsdoc/IPlugin.html).
* `Chart.offsetY`
* `Chart.outerRadius` now lives on doughnut, pie, and polarArea controllers
* `Chart.plugins` was replaced with `Chart.registry`. Plugin defaults are now in `Chart.defaults.plugins[id]`.
+* `Chart.plugins.register` was replaced by `Chart.register`.
* `Chart.PolarArea`. New charts are created via `new Chart` and providing the appropriate `type` parameter
* `Chart.prototype.generateLegend`
* `Chart.platform`. It only contained `disableCSSInjection`. CSS is never injected in v3.
'use strict';
(function() {
- Chart.plugins.register({
+ Chart.register({
id: 'samples-filler-analyser',
beforeInit: function(chart, options) {