2 回答

TA貢獻(xiàn)1906條經(jīng)驗(yàn) 獲得超3個(gè)贊
您可以更改圖表多個(gè)部分的顏色:
GridLines(圖表中的垂直或水平線):
gridLines: {
color: '#5555ff'
}
蜱(你說(shuō)的數(shù)字):
ticks: {
fontColor: '#5555ff'
},
ScaleLabels(軸的名稱及其值):
scaleLabel: {
fontColor: '#5555ff'
}
這些都是您可以在軸的選項(xiàng)中指定的選項(xiàng)。
options: {
scales: {
xAxes: [{
// You insert the above code here
]}
}
}
編輯:這是我用我使用的代碼描述的選項(xiàng)的圖片:
xAxes: [{
ticks: {
fontColor: 'red'
},
gridLines: {
color: 'blue'
},
scaleLabel: {
display: true,
labelString: 'Employee',
fontSize: 20.0,
fontColor: 'green'
}
}]

TA貢獻(xiàn)1783條經(jīng)驗(yàn) 獲得超4個(gè)贊
試試這個(gè)
...
options: {
scales: {
yAxes: [{gridLines: { color: "#ffffff" },
scaleLabel: {
display: true,
fontColor:'#ffffff',
fontSize:12
},}]
}
}
..
添加回答
舉報(bào)