echarts 折线图阴影颜色渐变


series下面的这个areaStyle
series: [
          {
            data: count,
            type: "line",
            smooth: true,
            areaStyle: { normal: { color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
                  { offset: 0, color: "red" },
                  { offset: 0.5, color: "pink" },
                  { offset: 1, color: "black" }
                ])
              }
            }, //填充区域样式
            lineStyle: {
              color: "#00b5ff",
              width: 1
            }, //线条的样式
            itemStyle: {
              color: "rgb(255, 70, 131)",
              opacity: 0 //为0不会绘制图形拐点消失
            } //拐点的样式
          }
        ],

效果图


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM