This is a simple wrapper for ChartJS as a React.js component.
$ npm install react-chartjs-wrapper --save
importReactfrom'react';importChartJSfrom'react-chartjs-wrapper';classParentComponentextendsReact.Component{constructor(props){super(props);letdata={datasets: [{data: [10,20,30],backgroundColor: ["#F7464A","#46BFBD","#FDB45C"],hoverBackgroundColor: ["#FF5A5E","#5AD3D1","#FFC870"]}],labels: ['Red','Yellow','Blue']};this.state={data: data,type: 'pie'};}render(){return<div><h1>Chart.js Demo</h1><ChartJStype={this.state.type}data={this.state.data}/></div>}}