柱状图颜色渐变

主要设置itemStyle ->normal ->color 属性 new echarts.graphc.linearDradient()

 color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                  {
                    offset: 0,
                    color: "#2E8EFF",
                  },
                  {
                    offset: 0.5,
                    color: "#2E8EFF",
                  },
                  {
                    offset: 1,
                    color: "#2E8EFF",
                  },
                ]),

圆角设置

圆角设置series 属性下的 item Style ——> normal – > barBorderRadius : (数组格式 顺时针 对应4个角)

 itemStyle: {
              normal: {
                barBorderRadius:[0,0,10,10],
                color: "#00ffda",
              },
            },

背景设置

柱状背景设置series 属性下的 (在4.7.1 版本以上生效 

下载 echarts@4.1.0 实现地图使用下载 最新版实现 背景色功能 

            showBackground:true,
            backgroundStyle:{
            color:"rgba(000,000,000,0.05)"

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注