我想知道是否可以使用 ChartJS 更改图表轴的颜色。
谢谢
最佳答案
我知道这个问题是在 2 年前提出的,并且 OP 已经标记了正确答案,但是我有一个解决方案来解决 OP 在标记答案的评论中提到的问题并且我想解决它以节省其他人一些时间。
But this changes the color of the axis and all the gridLines, what if I just want to change the axis color? For example, I want the axis line solid black and the grid lines grey.
如果您正在尝试实现这一点,那么标记的答案不会为您做,但以下应该:
yAxes: [{
gridLines: {
zeroLineColor: '#ffcc33'
}
}]
关于javascript - 图表JS。更改轴线颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41958548/