页面树结构

版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

...

代码块
linenumberstrue
{
    "series": [{
        "itemStyle": {
            "normal": {
                "color": {
                    "colorStops": [{
                        "color": "#83bff6",
                        "offset": 0
                    }, {
                        "color": "#188df0",
                        "offset": 0.5
                    }, {
                        "color": "#188df0",
                        "offset": 1
                    }],
                    "global": false,
                    "type": "linear",
                    "x": 0,
                    "x2": 0,
                    "y": 0,
                    "y2": 1
                }
            }
        }
    }, {
        "itemStyle": {
            "normal": {
                "color": {
                    "colorStops": [{
                        "color": "#F57F2D",
                        "offset": 0
                    }, {
                        "color": "#F5A746",
                        "offset": 0.5
                    }, {
                        "color": "#F5DC2D",
                        "offset": 1
                    }],
                    "global": false,
                    "type": "linear",
                    "x": 0,
                    "x2": 0,
                    "y": 0,
                    "y2": 1
                }
            }
        }
    }]
}

另,若不需要颜色渐变可参考以下扩展属性:另,如希望实现从横向颜色渐变,需要修改下图红框代码。

Image Added

另,若不需要颜色渐变可参考以下扩展属性,具体说明见百度文档:https://www.jianshu.com/p/238fbd7927ab

代码块
languagexml
linenumberstrue
{
    "series": [{
        "itemStyle": {
            "normal": {
                "color": "#188df0"
            }
        }
    }, {
        "itemStyle": {
            "normal": {
                "color": "#F57F2D"
            }
        }
    }]
}

...