Skip to content

Commit 77779f8

Browse files
committed
Replace deprecated destroy hook with afterDestroy.
As per ChartJS 3.7.0, `destroy` is deprecated in favour of `afterDestroy`: https://www.chartjs.org/docs/latest/developers/plugins.html#chart-destroy
1 parent 3bf6b02 commit 77779f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export class ChartDatasourcePrometheusPlugin {
191191
ctx.restore();
192192
}
193193

194-
public destroy(chart: Chart, args: any, _options: any) {
194+
public afterDestroy(chart: Chart, args: any, _options: any) {
195195
// auto update
196196
if (!!chart['datasource-prometheus'].updateInterval)
197197
clearInterval(chart['datasource-prometheus'].updateInterval);

0 commit comments

Comments
 (0)