渐变折线图

描述:当前是关于Echarts图表中的 折线图 示例。
 
            option = {
          backgroundColor: '#020F37',
          tooltip: {
            trigger: 'axis',
            axisPointer: {
              label: {
                backgroundColor: '#6a7985'
              }
            }
          },
          xAxis: {
            data: [
              '11/21', '11/22', '11/23', '11/24',
              '11/25', '11/26', '11/27'
            ],
            type: 'category',
            boundaryGap: true,
            itemStyle: {
              borderColor: 'blue',
              color: '#ffffff'
            },
            axisLabel: {
              textStyle: {
                show: true,
                fontFamily: '微软雅黑',
                // color: '#5DCFF6',
                color: '#fff',

                fontSize: '12'
              }
            }
          },
          yAxis: {
            name: '(万元)',
            type: 'value',
            splitLine: {
              show: true,
              lineStyle: {
                // type: 'dashed'
                color:'rgba(255,255,255,0.2)'
              }
            },
            axisLabel: {
              textStyle: {
                show: true,
                fontFamily: '微软雅黑',
                // color: '#5DCFF6',
                color: '#fff',

                fontSize: '12'
              }
            },
          },
          grid: {
            left: '0%',
            top: '15%',
            right: '0%',
            bottom: '5%',
            containLabel: true
          },
          series: [{
            data: [
              14, 12, 15, 46, 13, 23, 14
            ],
            name: '',
            type: 'line',
            // symbol: 'circle',
            symbol: 'emptyCircle',
            smooth: true,
            symbolSize: 7,
            lineStyle: {
              width: 1,
              type: 'solid'
            },
            itemStyle: {
              borderWidth: 1,
              borderColor: '#F4F65B',
              color: '#F4F65B'
            },
            areaStyle: {
              color: '#F4F65B',
              normal: {
                //线性渐变,前4个参数分别是x0,y0,x2,y2(范围0~1);相当于图形包围盒中的百分比。如果最后一个参数是‘true’,则该四个值是绝对像素位置。
                color: new echarts.graphic.LinearGradient(
                  0,
                  0,
                  0,
                  1,
                  [{
                      offset: 0,
                      // color: 'RGBA(184, 204, 241, 1)'
                      color: '#F4F65B'
                    },
                    {
                      offset: 0.5,
                      // color: 'RGBA(184, 204, 241, 0.5)'
                      color: '#3E483A'
                    },
                    {
                      offset: 1,
                      color: '#0D152F'
                      // color: '#283D46'
                    }
                  ],
                  false
                ),
                shadowBlur: 0 //shadowBlur设图形阴影的模糊大小。配合shadowColor,shadowOffsetX/Y, 设置图形的阴影效果。
              }
            }
          }]
        }