Name: react-chartjs
Owner: Legitcode
Description: common react charting components using chart.js
Created: 2015-11-10 02:07:06.0
Updated: 2016-05-15 07:14:36.0
Pushed: 2015-11-09 15:49:07.0
Homepage: null
Size: 454
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
rich interactive react charting components using chart.js including
This is a CommonJS component only (to be used with something like Webpack or Browserify)
install --save react-chartjs
You must also include chart.js and React as dependencies.
LineChart = require("react-chartjs").Line;
MyComponent = React.createClass({
nder: function() {
return <LineChart data={chartData} options={chartOptions} width="600" height="250"/>
`canvas
` element`.update()
. If you want the chart destroyed and redrawn on every change, pass in ``
redraw` as a prop. For example
<LineChart data={this.state.chartData} redraw />``
The `canvas
element can be retrieved using ``
getCanvas` and the
chartjs object``
can be retrieved using `getChart
`.