美文网首页
ECharts 碰到一些关于背景啊border 啦 的备忘

ECharts 碰到一些关于背景啊border 啦 的备忘

作者: 工作餐不挑的Arin | 来源:发表于2018-12-16 17:02 被阅读0次

1:折线图的背景加入 渐变。这个经常用到

itemStyle: {

            borderColor: 'red',

            borderWidth: 3,

            normal: {

              areaStyle: {

                color: {

                  type: 'linear',

                  x: 0,

                  y: 0,

                  x2: 0,

                  y2: 1,

                  colorStops: [{

                    offset: 0, color: 'rgba(236, 64, 118, 0.8)' // 0% 处的颜色                  }, {

                    offset: 1, color: 'rgba(94, 38, 227, 0.5)' // 100% 处的颜色                  }],

                  globalCoord: false // 缺省为 false                }

              }

            }

          },

1:柱状图背景加入 渐变。这个经常用到

itemStyle: {

                normal: {

                    barBorderRadius: 20,

                    color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{

                        offset: 0,

                        color: '#99d9ea'

                    }, {

                        offset: 1,

                        color: '#3fa7dc'

                    }]),

                    shadowColor: 'rgba(0, 0, 0, 0.4)',

                    shadowBlur: 20

                }

            }

---------------------

作者:不吃鱼的猫咪

来源:CSDN

原文:https://blog.csdn.net/u012612399/article/details/53838326

版权声明:本文为博主原创文章,转载请附上博文链接!

3:饼图加边框 下列为白色的

itemStyle:{

                        show:false,

                        borderColor:'#fff',

                        borderWidth:2

                    },

相关文章

网友评论

      本文标题:ECharts 碰到一些关于背景啊border 啦 的备忘

      本文链接:https://www.haomeiwen.com/subject/htjxkqtx.html