Extending Chart.js
There are several ways to extend Chart.js. You may use the prototype methods, callbacks, and event handlers and interact with the rendering process; you can create plugins, which have their own life cycle and are easier to reuse in other charts; and you can extend Chart.js from existing charts or even create new charts and scales.
Prototype methods
Prototype methods are automatically called during rendering and updates. You can also call them directly if you need to interfere with the rendering process. They are listed in the following table:
Method | Description |
| Destroys a chart instance. This can be used if you wish to reuse the canvas, or remove the chart completely. |
| Restores the chart to its initial state (after layout and before its initial animation). A new animation can be triggered with |
| Stops an animation loop. This is usually called in an |
| Clears... |