Echarts折线图渐变色的属性设置解决方案

在这里插入图片描述
这些设置itemStyle的图形属性即可:

itemStyle: {
                    "color": {
                        "type": "linear",
                        "x": 0,
                        "y": 0,
                        "x2": 0,
                        "y2": 1,
                        "colorStops": [
                            {
                                "offset": 0,
                                "color": "#00fff2"
                            },
                            {
                                "offset": 1,
                                "color": "#194874"
                            }
                        ],
                        "globalCoord": false
                    }
                }

Done!

猜你喜欢

转载自blog.csdn.net/weixin_41290949/article/details/105196656