Echart Line平滑折线,填充颜色

option = {
      tooltip: {
        trigger: 'axis',
        axisPointer: {
          type: 'cross',
          label: {
            backgroundColor: '#6a7985'
          }
        }
      },
      //color:['#009999','#00BFFF'],
      legend: {
        data: ['邮件营销', '联盟广告']
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      xAxis: [{
        type: 'category',
        boundaryGap: false,
        data: [1, 2, 3, 4, 5, 6, 7]
      }],
      yAxis: [{
        type: 'value'
      }],
      series: [{
          name: '邮件营销',
          type: 'line',
          smooth: true, //添加此配置项让曲线变平滑 
          label: {
            normal: {
              show: true,
              position: 'top'
            }
          },
          areaStyle: {},
          // areaStyle: {
          //     color:"#009999"
          // },
          data: [15, 25, 35, 40, 33, 23, 18]
        },
        {
          name: '联盟广告',
          type: 'line',
          smooth: true, //添加此配置项让曲线变平滑
          label: {
            normal: {
              show: true,
              position: 'top'
            }
          },
          areaStyle: {},
          //  areaStyle: {
          //     color:"#00BFFF"
          // },
          data: [10, 20, 33, 38, 25, 20, 10]
        }
      ]
};

Echart Line平滑折线,填充颜色_第1张图片

你可能感兴趣的:(小程序)