我有点坚持根据垂直轴上的数字向 ChartJS 中的行添加条件背景颜色。
例如。
If the vertical axis is between 0 - 6, background colour for those rows is green.
If the vertical axis is between 6 - 12 background colour for those rows is grey
If the vertical axis is > 12 background colour for those rows is red
Run Code Online (Sandbox Code Playgroud)
以前有人做过这样的事情吗?
我附上了一张大致描述功能的图片。
干杯!