[Chartjs]-How can I solve chart_js.Chart.register problem when using chart.js

0πŸ‘

βœ…

2 Things, you are not importing all the elements you are trying to register and since Chart.register is not a function I suspect you are using V2 of Chart.js which is non treeshakable. So you can’t and don’t have to use register to show the charts unless you are going to upgrade to V3 and use treeshaking

If you want to register any plugins in V2 you need to register them on the plugins of the chart like so:

Chart.plugins.register(plugins);

Leave a comment