Echarts---添加漸變功能

color: new echarts.graphic.LinearGradient(0,0,0,1,[{offset: 0, color: '#962d8a'  },{offset: 1, color: '#1d0d29'}], false)
series : [
            {
                name:'PM3.0',
                type:'line',
                smooth:true,

                itemStyle: {
                    normal: {
                        areaStyle: {
                            /*color: '#842f7d',*/
                            color: new echarts.graphic.LinearGradient(0,0,0,1,[{offset: 0, color: '#962d8a'  },{offset: 1, color: '#1d0d29'}], false),
                            type: 'default'
                        },
                        lineStyle:{
                            color: '#842f7d'
                        },
                        /*color: new echarts.graphic.LinearGradient(0,0,0,1,[{offset: 0, color: '#7609a2'  },{offset: 1, color: '#e0277d'}], false)*/
                    }
                },
                data:[10, 12, 21, 54, 260, 830, 710]
            }
]
相關文章
相關標籤/搜索