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

[v5] 调用 changeData 后,图例没有同步更新。 #4939

Closed
pepper-nice opened this issue May 5, 2023 · 3 comments · Fixed by #5002
Closed

[v5] 调用 changeData 后,图例没有同步更新。 #4939

pepper-nice opened this issue May 5, 2023 · 3 comments · Fixed by #5002
Assignees
Labels

Comments

@pepper-nice
Copy link
Contributor

代码

const chart = new Chart({ theme: 'classic', container: div, canvas });
chart.data([
  { genre: 'Sports', sold: 275 },
  { genre: 'Strategy', sold: 115 },
  { genre: 'Action', sold: 120 },
  { genre: 'Shooter', sold: 350 },
  { genre: 'Other', sold: 150 },
]);
const interval = chart
  .interval()
  .encode('x', 'genre')
  .encode('y', 'sold')
  .encode('color', 'genre');
const finished = chart.render();
button.onclick = () => {
  interval.changeData([
    { genre: 'Action', sold: 120 },
    { genre: 'Shooter', sold: 350 },
  ]);
};

现象

iShot_2023-05-05_09 54 08

@soonio
Copy link

soonio commented May 10, 2023

同样的问题,在v5.0.6有,暂时只能退回到5.0.5了~。

@pepper-nice
Copy link
Contributor Author

同样的问题,在v5.0.6有,暂时只能退回到5.0.5了~。

问题已修复,安装最新依赖试试。

@pearmini
Copy link
Member

同样的问题,在v5.0.6有,暂时只能退回到5.0.5了~。

问题已修复,安装最新依赖试试。

目前还没有修复哈,等这个 PR 合并:#5002

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.

4 participants