Closed jlmn1026 closed 2 years ago
This page's sample doesn't work after building due to tree-shaking. Chart Component needs to register Controller (this sample needs Bar and Line Controller). https://react-chartjs-2.js.org/examples/multitype-chart
this can't be reproduced in sandbox.
https://codesandbox.io/s/github/reactchartjs/react-chartjs-2/tree/master/sandboxes/chart/multitype?from-embed
3.8.0
4.3.1
add BarController, LineController to register.
Hi @HalJune1026 👋
Thank you for bringing this up! I was able to reproduce it and indeed importing and registering BarController and LineController solves the issue.
BarController
LineController
I'll make a PR to fix it momentarily.
Would you like to work on a fix?
Current and expected behavior
This page's sample doesn't work after building due to tree-shaking. Chart Component needs to register Controller (this sample needs Bar and Line Controller). https://react-chartjs-2.js.org/examples/multitype-chart
this can't be reproduced in sandbox.
Reproduction
https://codesandbox.io/s/github/reactchartjs/react-chartjs-2/tree/master/sandboxes/chart/multitype?from-embed
chart.js version
3.8.0
react-chartjs-2 version
4.3.1
Possible solution
add BarController, LineController to register.