[Chartjs]-Class does not have id chartjs

1👍

The plugin needs to have an unique id.

You could add an id (see following example):

 const annotationLinePlugin = {
   id: 'annotationLine',
   ....  
 }

Be also aware the afterDatasetsDraw hook has got a different signature (arguments).
https://www.chartjs.org/docs/latest/api/interfaces/Plugin.html#afterdatasetsdraw

Leave a comment