三条折线重叠,组成一小段流动效果echarts 折线配置项内容和展示

利用重叠的三条折线,加上动画的延迟,制作出一小段线条延着线流动效果。

配置项如下
      option = {
  xAxis: {
    type: 'category',
    data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
  },
  yAxis: {
    type: 'value'
  },
  series: [
    {
      data: [820, 932, 901, 934, 1290, 1330, 1320],
      type: 'line',
      smooth: true,
      lineStyle:{
          color: '#49bfde'
      }
    },
    {
      data: [820, 932, 901, 934, 1290, 1330, 1320],
      type: 'line',
      smooth: true,
      lineStyle:{
          color: '#ee7c2f'
      },
      animationDelay: 50,
      animationDuration: 5000
    },
    {
      data: [820, 932, 901, 934, 1290, 1330, 1320],
      type: 'line',
      smooth: true,
       lineStyle:{
          color: '#49bfde'
      },
      animationDelay: 500,
      animationDuration: 5000
    }
  ]
};
    
截图如下