echarts折线图渐变,图例不渐变,怎么实现

新手上路,请多包涵
      this.echarts1_option.option.series.push({
        name: this.cclass[index],
        data: element,
        type: 'line',
        areaStyle: {},
        itemStyle: {
          normal: {
            lineStyle: {
              color: color[index],
            },
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
              { offset: 0, color: color[index] },
              { offset: 1, color: '#fff' },
            ]),
          },
        },
      });
阅读 3k
1 个回答
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题