0
陣營圖表2 https://github.com/gor181/react-chartjs-2如何設置react-chartjs-2中的選項?
是參照下面
圖JS http://www.chartjs.org/docs/#getting-started
在反應-chartjs-2引用chart.js之文檔的文檔,他們都錯了。我無法弄清楚如何在反應中配置圖表,特別是選項。有人知道嗎?
陣營圖表2 https://github.com/gor181/react-chartjs-2如何設置react-chartjs-2中的選項?
是參照下面
圖JS http://www.chartjs.org/docs/#getting-started
在反應-chartjs-2引用chart.js之文檔的文檔,他們都錯了。我無法弄清楚如何在反應中配置圖表,特別是選項。有人知道嗎?
<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
}
}}
/>
歡迎來到Stack Overflow。向您發佈的代碼中添加一些解釋文字是一個好主意,以防止它們被標記爲低質量。 –
很高興知道:)謝謝! – Stef12