2 回答
TA貢獻1906條經驗 獲得超3個贊
您可以更改圖表多個部分的顏色:
GridLines(圖表中的垂直或水平線):
gridLines: {
color: '#5555ff'
}
蜱(你說的數字):
ticks: {
fontColor: '#5555ff'
},
ScaleLabels(軸的名稱及其值):
scaleLabel: {
fontColor: '#5555ff'
}
這些都是您可以在軸的選項中指定的選項。
options: {
scales: {
xAxes: [{
// You insert the above code here
]}
}
}
編輯:這是我用我使用的代碼描述的選項的圖片:

xAxes: [{
ticks: {
fontColor: 'red'
},
gridLines: {
color: 'blue'
},
scaleLabel: {
display: true,
labelString: 'Employee',
fontSize: 20.0,
fontColor: 'green'
}
}]
TA貢獻1783條經驗 獲得超5個贊
試試這個
...
options: {
scales: {
yAxes: [{gridLines: { color: "#ffffff" },
scaleLabel: {
display: true,
fontColor:'#ffffff',
fontSize:12
},}]
}
}
..
添加回答
舉報
