Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

动画使得 lineDash 更新失效 #4953

Closed
pearmini opened this issue May 8, 2023 · 1 comment · Fixed by #5019
Closed

动画使得 lineDash 更新失效 #4953

pearmini opened this issue May 8, 2023 · 1 comment · Fixed by #5019
Assignees
Labels

Comments

@pearmini
Copy link
Member

pearmini commented May 8, 2023

  • 问题:动画会使得 lineDash 更新失效
  • 出现原因:动画没有更新 lineDash 属性
  • 版本:5.0.5
import { Chart } from '@antv/g2';

const chart = new Chart({
  container: 'container',
  theme: 'classic',
  autoFit: true,
});

chart
  .line()
  .data({
    type: 'fetch',
    value:
      'https://gw.alipayobjects.com/os/bmw-prod/551d80c6-a6be-4f3c-a82a-abd739e12977.csv',
    transform: [{ type:'slice', start: 0, end: 10 }]
  })
  .encode('x', 'date')
  .encode('y', 'close')
  .style("lineDash", [5, 2]);

chart.render().then(chart => {
  const [line] = chart.getNodesByType('line');
  line.style("lineDash", [1, 1])
  chart.render();
});
@pearmini pearmini added the V5 label May 8, 2023
@pearmini pearmini self-assigned this May 8, 2023
pearmini added a commit that referenced this issue May 15, 2023
…ut animation (#5019)

* fix(animation): update non-transform attribute (close: #4953)

* fix(animation): non animation replace node (close: #5006)

* fix: ci
hustcc pushed a commit that referenced this issue May 16, 2023
…ut animation (#5019)

* fix(animation): update non-transform attribute (close: #4953)

* fix(animation): non animation replace node (close: #5006)

* fix: ci
hustcc pushed a commit that referenced this issue May 16, 2023
…ut animation (#5019)

* fix(animation): update non-transform attribute (close: #4953)

* fix(animation): non animation replace node (close: #5006)

* fix: ci
@zzinx58
Copy link

zzinx58 commented Sep 19, 2023

你好,这个问题该怎么解决?。。实测去掉 line 图表的 animation 后,linedash 的样式才能生效。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants