React Charts 2
https://github.com/gor181/react-chartjs-2
参考以下内容
Chart JS http://www.chartjs.org/docs/#getting-started
在react-chartjs-2的文档中,引用了chart.js的文档,但都是错误的。我无法弄清楚如何在react中配置图表,特别是选项。有谁知道吗?
参考以下内容
Chart JS http://www.chartjs.org/docs/#getting-started
在react-chartjs-2的文档中,引用了chart.js的文档,但都是错误的。我无法弄清楚如何在react中配置图表,特别是选项。有谁知道吗?
<Bar
data={{
labels: this.props.labels,
datasets: this.props.data
}}
options={{
legend: {
display: false
},
scales: {
yAxes: [{
ticks: {
max: this.props.maxY,
min: 0,
stepSize: 3
}
}]
},
title: {
display: this.props.display,
text: this.props.title
}
}}
/>