I used the last example from docs: Chart with dynamic
I found a bug, as shown on the screenshot below, which disables me from using the lib at all.
When I run npm run build, the package is not built because of the type error.
I think the problem is the way Chart is imported in BaseChart.tsx.
So I found a solution to this bug, but it doesn't solve the problem completely.
According to docs, Chart.js should be imported like this:
import { Chart, registerables } from 'chart.js';
Chart.register(...registerables);
The caveat is that it breaks the custom chartOptions later used in the chart component. It applies default Chart.js options instead.
Is there any way we could solve the type issue in BaseChart.tsx or is this something else?
Hey, thanks for this awesome library!
I used the last example from docs: Chart with dynamic I found a bug, as shown on the screenshot below, which disables me from using the lib at all. When I run
npm run build
, the package is not built because of the type error.I think the problem is the way
Chart
is imported inBaseChart.tsx
. So I found a solution to this bug, but it doesn't solve the problem completely. According to docs, Chart.js should be imported like this:https://www.chartjs.org/docs/next/getting-started/integration.html
The caveat is that it breaks the custom
chartOptions
later used in the chart component. It applies default Chart.js options instead. Is there any way we could solve the type issue inBaseChart.tsx
or is this something else?