Open brklntmhwk opened 2 years ago
Have you taken a look at this? https://react-chartjs-2.js.org/docs/migration-to-v4/#tree-shaking
v4 of this library, just like Chart.js v3, is tree-shakable. It means that you need to import and register the controllers, elements, scales, and plugins you want to use.
Thank you for replying, @m-paul ! I haven't taken a look at that document, but I already tried to import the whole library like this.
import { Radar } from 'https://cdn.skypack.dev/react-chartjs-2';
import { Chart as ChartJS, registerables } from 'https://cdn.skypack.dev/chart.js';
ChartJS.register(...registerables);
That still gets me this error message:
Error in component "const HeaderComponent = pluginInternalNoteHeaderComponent;
": Error: "radialLinear" is not a registered scale.
Despite that I've registered all, it still says something is not registered. I'd be thankful if you could give me any hints of it.
First, thank you for this cool plugin! Codes get more stylish and simpler with it.
Issue
I've been trying to develop a system where you select values in an input form and submit them and then render a radar chart with them used as the data. To make it happen, I tried some react chart libraries such as react-chartjs-2 and recharts by importing them via skypack CDN, but they don't work possibly due to problems around dependencies. I was wondering if you could give me any advice or hints about this.
i.e.; Chart.md
Daily Note.md
Then you get,