reactjs / react-chartjs

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

Unhandled Exception #228

Open toddpratt opened 5 years ago

toddpratt commented 5 years ago

TypeError: (new Chart(...))[chartType] is not a function

This is what I'm using:

{ "name": "ui", "version": "0.1.0", "private": true, "dependencies": { "chart.js": "^2.7.3", "react": "^16.8.1", "react-chartjs": "^1.2.0", "react-dom": "^16.8.1", "react-scripts": "2.1.5", "reactstrap": "^7.1.0" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": "react-app" }, "browserslist": [ ">0.2%", "not dead", "not ie <= 11", "not op_mini all" ] }

aarongreenwald commented 5 years ago

I had the same issue, downgrading to chart.js@1.1.1 fixed it.