Skip to content

Commit

Permalink
remove extra line in docs, implement feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeLenaleee committed Dec 1, 2021
1 parent ff47c55 commit 8475728
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion docs/developers/plugins.md
Expand Up @@ -148,7 +148,6 @@ Plugins can interact with the chart during the event handling process. The event

![Chart.js event handling flowchart](./event_flowchart.png)


### Chart destroy

Plugins are notified during the destroy process. These hooks can be used to destroy things that the plugin made and used during its life.
Expand Down
4 changes: 3 additions & 1 deletion src/core/core.controller.js
Expand Up @@ -905,10 +905,12 @@ class Chart {
this.ctx = null;
}

// TODO V4: delete destroy hook and reference to it in plugin flowchart
this.notifyPlugins('destroy');
this.notifyPlugins('afterDestroy');

delete instances[this.id];

this.notifyPlugins('afterDestroy');
}

toBase64Image(...args) {
Expand Down

0 comments on commit 8475728

Please sign in to comment.