1👍
✅
plugins
must be defined as an array
as follows:
plugins = {[
plugin
]}
I couldn’t find this information on the react-chartjs-2 page directly but taking a look at types.ts
on GitHub, I found this…
/**
* The plugins array that is passed into the Chart.js chart
* @see https://www.chartjs.org/docs/latest/developers/plugins.html
* @default []
*/
plugins?: Plugin<TType>[];
Source:stackexchange.com