首页 > 其他 > 详细

angular5使用echart渐变色功能

时间:2020-01-10 19:11:18      阅读:193      评论:0      收藏:0      [点我收藏+]

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渐变色功能

原文:https://www.cnblogs.com/wei-dong/p/12177241.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!