Closed scil closed 2 years ago
same error: https://github.com/sgratzl/chartjs-chart-wordcloud/issues/4
chart.js 3 is ESM tree shakeable and requires to register all components that you are going to use. Thus, you have to register the linear scale manually
so add this line
import { Chart, registerables } from 'chart.js';Chart.register(...registerables);
And plugin zoom is also needed.
npm i chartjs-plugin-zoom
import { Chart, registerables } from 'chart.js';
import zoomPlugin from "chartjs-plugin-zoom";
Chart.register(...registerables, zoomPlugin);
Describe the bug
I follow this demo Vue 2 + composition API: CodeSandbox demo Vue 2 + composition
got error like
ERROR Error: "linear" is not a registered scale