The Wayback Machine - https://web.archive.org/web/20200612043310/https://github.com/alibaba/BizCharts/issues/924
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

Tooltip should use default config if some props are undefined #924

Open
Frezc opened this issue Jul 31, 2019 · 5 comments
Open

Tooltip should use default config if some props are undefined #924

Frezc opened this issue Jul 31, 2019 · 5 comments

Comments

@Frezc
Copy link
Contributor

@Frezc Frezc commented Jul 31, 2019

retro step:

  1. click "toggle tooltip", tooltip change to sticky mode.
  2. click "toggle tooltip", tooltip should recover default config, but it not.
@Frezc
Copy link
Contributor Author

@Frezc Frezc commented Jul 31, 2019

chart.tooltip({ ...nextProps });

g2的tooltip只会合并传入的配置,所以传入undefined并不能修改配置,这个和使用react组件的直觉是相悖的。

@Leannechn
Copy link
Contributor

@Leannechn Leannechn commented Sep 19, 2019

可以通过修改react 组件的key来销毁并重建这个组件。

@Frezc
Copy link
Contributor Author

@Frezc Frezc commented Sep 19, 2019

@Leannechn 请问你试过吗? 我用的时候换key tooltip就失效了。 如果你能修好这个bug也不错啊

@Leannechn
Copy link
Contributor

@Leannechn Leannechn commented Nov 8, 2019

chart组件上加 forceUpdate

@Leannechn
Copy link
Contributor

@Leannechn Leannechn commented Nov 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.