rich interactive react charting components using chart.js including
- Line chart
- Bar chart
- Radar chart
- Polar area chart
- Pie chart
- Doughnut chart
This is a CommonJS component only (to be used with something like Webpack or Browserify)
npm install --save react-chartjs
You must also include chart.js and React as dependencies.
var LineChart = require("react-chartjs").Line;
var MyComponent = React.createClass({
render: function() {
return <LineChart data={chartData} options={chartOptions} width="600" height="250"/>
}
});
data
represents the chart data (see chart.js for details)options
represents the chart options (see chart.js for details)- all other parameters will be passed through to the
canvas
element
If you like this project you may support me by donating something on Gittip, starring this repository or reporting bugs and ideas in the issue section.