Echarts 的渐变色

    series: [{
                    name: Ydw,
                    type: 'bar',
                    barWidth: 30,//柱图宽度
                    itemStyle: {
                        normal: {
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                                offset: 0,
                                color: '#01b1fd'
                            }, {
                                offset: 1,
                                    color: '#033bff'
                            }]),
                        }
                    },
                    data: ydata
                }]

第一个颜色为高亮颜色, 第二个为底色

posted @ 2020-08-26 09:36  敌八哥  阅读(212)  评论(0编辑  收藏  举报