Skip to main content
edited tags
Link
Shubham Khatri
  • 283.8k
  • 58
  • 431
  • 411
Source Link
Elena
  • 749
  • 3
  • 9
  • 19

Chart.js with React

I want to implement charts in my project, and I decided to use react-chart.js

I'm at the very beginning trying to add an example in my components, so I added this code :

var MyChart = React.createClass({ render: function() { console.log(chartData) return <LineChart data={chartData} options={null} width="600" height="250"/> } }); module.exports = MyChart; 

chartData is an object

I have an err:

core.js:64 Uncaught TypeError: (intermediate value)[chartType] is not a function

I also tried other charts, but none of them did work, so I probably do something wrong, but I can't find what