antvis/G2

雷达图重新执行render()无法触发动画效果 #3695

dushiying posted onGitHub

  • I have searched the issues of this repository and believe that this is not a duplicate.

https://g2.antv.vision/zh/examples/radar/radar#basic

Steps to reproduce


chart
  .line()
  .position('item*score')
  .color('user')
  .size(2)
  .animate({
  appear: {
    animation: 'path-In', // 动画名称
    easing: 'easeQuadIn', // 动画缓动效果
    duration: 3000 // 动画执行时间
  }
});

chart
  .point()
  .position('item*score')
  .color('user')
  .shape('circle')
  .size(4)
  .style({
    stroke: '#fff',
    lineWidth: 1,
    fillOpacity: 1,
  })
chart
  .area()
  .position('item*score')
  .color('user')
  .animate({
  appear: {
    animation: 'zoom-in', // 动画名称
    easing: 'easeQuadIn', // 动画缓动效果
    duration: 6000 // 动画执行时间
  }
});

// 通过定时器定时重新触发动画效果但是无效果
chart.render();
      const welcomeTimer = setInterval(() => {
            chart.render();
}, 10000)
Environment Info
g2 4.1.32
System windows10
Browser chrome

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


我这里是 ok 的,是不是你设置的 timer 是 10s,你以为是 1s?


Jun-22-2022 13-42-57

posted by hustcc almost 3 years ago

Fund this Issue

$0.00
Funded

Pull requests