React-chartjs-2: Compatibility with Chart.js 3

Created on 4 Apr 2021  路  6Comments  路  Source: reactchartjs/react-chartjs-2

Chart.js 3 changes some things, specifically it no longer exports the Chart class as a default export, so react-chartjs-2 fails to start with

Uncaught TypeError: _chart.default is undefined
    <anonymous> index.js:643

Migration guide: https://www.chartjs.org/docs/latest/getting-started/v3-migration.html

Most helpful comment

Now wondering if energies would be better put towards https://github.com/xr0master/chartjs-react

All 6 comments

I fork the repository, and merge #599 3.x Migration.
Try this: @iftek/react-chartjs-3

@yuan9090 will @iftek/react-chartjs-3 be published to npm? I don't see any movement on the 3.0 release project for react-charts-2.

We definitely have lost traction of chartV3. :( Sorry folks, I haven't been keeping up on updates

Now wondering if energies would be better put towards https://github.com/xr0master/chartjs-react

@kenbankspeng Yes, try npm i @iftek/react-chartjs-3

Hi! We have updated the wrapper. Try to use the latest version ^3.0.2 with Chart.js ^3.x.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

n1c01a5 picture n1c01a5  路  4Comments

flxwu picture flxwu  路  3Comments

alexchoiweb picture alexchoiweb  路  3Comments

nealoke picture nealoke  路  5Comments

souuu picture souuu  路  4Comments