渐变折线图

描述:当前是关于Echarts图表中的 折线图 示例。
 
              let data1 = ["车流量"];
  let data2 = ["11", "22", "33", "44", "55", "66", "77"];
  let data3 = [4000, 6000, 7000, 2000, 5000, 7000, 9000];
  let data4 = [1000, 4000, 5000, 6000, 3000, 8000, 7000];
option = {
      backgroundColor: "#03213D",
   //你的代码
     color: [
        new echarts.graphic.LinearGradient(0, 0, 1, 0, [
          { offset: 0, color: "#FF7E00" },
          { offset: 0.5, color: "#D1FB28" },
          { offset: 1, color: "#00FFB9" }
        ])
      ],
      tooltip: {
        show: true,
        trigger: "axis",
        textStyle: {
          color: "#000"
        },
        axisPointer: {
          lineStyle: {
            color: "#4681C2"
          }
        },

      },
      grid: {
        left: "2%",
        right: "5%",
        bottom: "5%",
        top: "34px",
        containLabel: true
      },

      legend: {
        show: true,
        top: "10px",
        right: "5%",
        itemWidth: 12,
        itemHeight: 12,
        formatter: ["{a|{name}}"].join("\n"),
        textStyle: {
          fontSize: 12,
          color: "#6A93B9",
          height: 8,
          rich: {
            a: {
              verticalAlign: "bottom"
            }
          }
        },
        data: data1
      },
      xAxis: {
        type: "category",
        axisLine: {
          lineStyle: {
            color: "#396EAA",
            fontSize: 12
          }
        },
        axisLabel: {
          color: "#FFFFFF",
          fontSize: 12
        },
        axisTick: {
          show: false
        },
        data: data2
      },
      yAxis: {
        type: "value",
        name: "预警量",

        nameTextStyle: {
          fontSize: 12,
          color: "#70A2D9",
          align: "right"
        },
        splitLine: {
          lineStyle: {
            color: "#396EAA"

          }
        },
        splitArea: { show: false },
        axisLine: {
          show: false
        },
        axisTick: {
          show: false
        },
        axisLabel: {
          fontSize: 12,
          fontFamily: "Bebas",
          color: "#70A2D9"
        }
      },
      series: [
        {
          type: "line",
          symbol: "none",
          smooth: true,
          name: data1[0], // 图例对应类别
          data: data3, // 纵坐标数据
          lineStyle: {
            width: 3
          }
        }
      
      ]
    };