echart渐变色

时间:2021-03-05 13:07:07   收藏:0   阅读:0
areaStyle: {
                            opacity: 0.8,
                            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, //4个参数用于配置渐变色的起止位置, 这4个参数依次对应右/下/左/上四个方位. 而0 0 0 1则代表渐变色从正上方开始 
                            [{
                                offset: 0,
                                color: ‘rgba(55, 162, 255)‘
                            }, {
                                offset: 1,
                                color: ‘rgba(116, 21, 219)‘
                            }]//数组, 用于配置颜色的渐变过程. 每一项为一个对象, 包含offset和color两个参数. offset的范围是0 ~ 1, 用于表示位置
                            )
                        },

 一、关键点在于这个方法 

new echarts.graphic.LinearGradient


评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!