(本文档仅供参考)
问题
自助仪表盘柱图上想要柱子的颜色实现渐变的效果,如下截图
解决方案
具体请参考如下扩展属性:
{ "series": [{ "itemStyle": { "normal": { "color": { "x": 0, "y": 0, "x2": 0, "y2": 1, "type": "linear", "global": false, "colorStops": [{ "offset": 1, "color": "#FFBB77" }, { "offset": 0, "color": "#D26900" }] } } } }] }