好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

angular5使用echart渐变色功能

1. import echarts from \'echarts\' ;

2.

options = {
      backgroundColor: \'#fff\',
      xAxis: {
        type: \'category\',
        boundaryGap: false,
        data: xValue,
      },
      yAxis: {
        type: \'value\'
      },
      series: [{
        data: [820, 932, 901, 934, 1290, 1330, 1320],
        type: \'line\',
        itemStyle: {
          color: \'#00CD9F\'
        },
        areaStyle: {
          color: new (<any>echarts).graphic.LinearGradient(0, 0, 0, 1, [{
            offset: 0,
            color: \'rgba(0,205,159,0.2)\'
          }, {
            offset: 1,
            color: \'rgba(0,232,205,0)\'
          }])
        }
      }]
    };

查看更多关于angular5使用echart渐变色功能的详细内容...

  阅读:32次