chartjs / Chart.js

Simple HTML5 Charts using the <canvas> tag
https://www.chartjs.org/
MIT License
64.36k stars 11.89k forks source link

Switch codesandbox templates to vitepress #10920

Open LeeLenaleee opened 1 year ago

LeeLenaleee commented 1 year ago

Expected behavior

codesandbox templates should work with V4

Current behavior

They don't want to import chart.js

Reproducible sample

https://codesandbox.io/s/react-chartjs-2-chart-js-issue-template-forked-64m243

Optional extra steps/info to reproduce

No response

Possible solution

switching to VITE

https://github.com/reactchartjs/react-chartjs-2/issues/1110

https://github.com/reactchartjs/react-chartjs-2/commit/0f93ce870ba39a7cd7b911fee8f87d7d69f1ef54

Context

No response

chart.js version

4.0.1

Browser name and version

No response

Link to your project

No response

xr0master commented 1 year ago

Or, you can use https://github.com/xr0master/chartjs-react and forgot about these issues at all :)

LeeLenaleee commented 1 year ago

No because the same issue seems to happen for vue and angular

xr0master commented 1 year ago

@LeeLenaleee right, but it's codesandbox issue. In stackblitz it works perfectly: https://stackblitz.com/edit/react-ts-i4bdr9