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

fix: chart.options changeData problem #4936

Merged
merged 1 commit into from
May 5, 2023
Merged

fix: chart.options changeData problem #4936

merged 1 commit into from
May 5, 2023

Conversation

pepper-nice
Copy link
Contributor

问题描述

使用 spec 方式申明 Chart 时,调用 changeData 不生效。

原因:因为 changeData 通过 this.attr('data', data) 来更新 data,对 options 中的 data 无法做更改。

解决方法

chart 复写 changeData 方法,调用一次 this.options({ data: newData })

@pearmini
Copy link
Member

pearmini commented May 5, 2023

处理一下冲突,这个 PR 可以现合并,之后实现了 updateRoot 之后把相关代码删除了就好了。

@pearmini pearmini merged commit 99bdec2 into v5 May 5, 2023
@pearmini pearmini deleted the fix/chart-changeData branch May 5, 2023 02:11
hustcc pushed a commit that referenced this pull request May 16, 2023
hustcc pushed a commit that referenced this pull request May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants