reactjs / react-chartjs

common react charting components using chart.js
MIT License
2.93k stars 301 forks source link

how to deploy chart v2? #138

Closed istok20 closed 6 years ago

istok20 commented 7 years ago

I've installed v1, then install v2 running this: npm i react-chartjs@git://github.com/reactjs/react-chartjs.git#chartjs-v2

now, no charts are rendered at all..

when the route with chart (that is not visible) is changed, i get

core.js:46 Uncaught TypeError: chart.destroy is not a function

how to deploy chart v2 correctly?

lindskogen commented 7 years ago

Are you using chartjs 2.0?

istok20 commented 7 years ago

no, just went back to v1, found out how to fill colors of datasets and that's ok for me:)

Keksike commented 7 years ago

Is it possible to use chartjs 2.0 with react-chartjs?

stavarengo commented 7 years ago

is it guys?

ledsun commented 7 years ago

If you want to use chart.js v2, use chartjs-v2 branch of the react-chart-js:

npm i react-chartjs@git://github.com/reactjs/react-chartjs.git#chartjs-v2

If you want to use chart.js v1, read documents of chart.js v1: https://github.com/chartjs/Chart.js/tree/v1.1.1/docs Options of chart.js is changed.

bactisme commented 7 years ago

When the V2 branch will be ready ?

nrempel commented 7 years ago

Hey, for everyone looking to use chartjs 2: https://github.com/gor181/react-chartjs-2 is actively maintained and works with version 2. I've switched over. It works well and should be mostly compatible (just change import statement)

couzic commented 7 years ago

Same here, I switched to react-chartjs-2 and so far I am happy. Same API and the repo is very active.

benmccann commented 6 years ago

Duplicate of https://github.com/reactjs/react-chartjs/issues/84

benmccann commented 6 years ago

I've closed this since it's a duplicate issue. I've also started discussion with the maintainers of react-chartjs-2 about merging that code into this repo