common react charting components using chart.js
JavaScript
2,912
101 commits
updated Feb 7, 2022
rich interactive react charting components using chart.js including
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.
npm install --save chart.js@^1.1.1 react react-dom
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)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.
165 followers · starred Dec 2015
603 followers · starred Sep 2018
216 followers · starred Jun 2015
118 followers · starred Aug 2016
common react charting components using chart.js
JavaScript
2,912
101 commits
updated Feb 7, 2022
rich interactive react charting components using chart.js including
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.
npm install --save chart.js@^1.1.1 react react-dom
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)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.
165 followers · starred Dec 2015
603 followers · starred Sep 2018
216 followers · starred Jun 2015
118 followers · starred Aug 2016