1.2.0 • Published 8 years ago
react-chartjs v1.2.0
react-chartjs
rich interactive react charting components using chart.js including
- Line chart
- Bar chart
- Radar chart
- Polar area chart
- Pie chart
- Doughnut chart
Installation
This is a CommonJS component only (to be used with something like Webpack or Browserify)
npm install --save react-chartjsYou must also include chart.js and React as dependencies.
npm install --save chart.js@^1.1.1 react react-domExample Usage
var LineChart = require("react-chartjs").Line;
var MyComponent = React.createClass({
render: function() {
return <LineChart data={chartData} options={chartOptions} width="600" height="250"/>
}
});datarepresents the chart data (see chart.js for details)optionsrepresents the chart options (see chart.js for details)- all other parameters will be passed through to the
canvaselement - if data passed into the component changes, points will animate between values using chart.js'
.update(). If you want the chart destroyed and redrawn on every change, pass inredrawas a prop. For example<LineChart data={this.state.chartData} redraw />
Chart References
The canvas element can be retrieved using getCanvas and the chartjs object can be retrieved using getChart.
1.2.0
8 years ago
1.1.0
8 years ago
1.0.0
8 years ago
2.0.0-beta2
9 years ago
2.0.0-beta1
9 years ago
2.0.0-beta
9 years ago
0.8.0
9 years ago
0.7.3
10 years ago
0.6.0
11 years ago
0.5.0
11 years ago
0.4.0
11 years ago
0.3.0
11 years ago
0.2.1
11 years ago
0.2.0
11 years ago
0.1.3
11 years ago
0.1.2
11 years ago
0.1.1
11 years ago
0.1.0
11 years ago
0.0.1
11 years ago