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

[Bug] Echarts tooltip throttle getWidth error #16146

Closed
scttcper opened this issue Nov 30, 2021 · 2 comments
Closed

[Bug] Echarts tooltip throttle getWidth error #16146

scttcper opened this issue Nov 30, 2021 · 2 comments
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.

Comments

@scttcper
Copy link

Version

5.2.2

Link to minimal reproduction

No response

Steps To Reproduce

Destroy a component while the tooltip is recalculating position, the throttle function attempts to run after the chart has been destroyed.

image

TypeError: this._zr is null
  at getWidth(../node_modules/echarts/lib/core/echarts.js:447:5)
  at apply(../node_modules/echarts/lib/component/tooltip/TooltipView.js:647:31)
  at exec(../node_modules/echarts/lib/util/throttle.js:72:8)

Current Behavior

getWidth errors

Expected Behavior

The throttle function should be destroyed when the chart is destroyed, or getWidth should fail silently

I believe this is not being destroyed

? throttle(bind(this._doUpdatePosition, this), 50)

Environment

- OS: MacOs
- Browser: chrome 96
- Framework: react

Any additional comments?

No response

@scttcper scttcper added the bug label Nov 30, 2021
@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. waiting-for: community labels Nov 30, 2021
@pissang
Copy link
Contributor

pissang commented Dec 1, 2021

Thanks for the feedback. It has been fixed in #16070. Which will be included in our next version

@scttcper
Copy link
Author

scttcper commented Dec 1, 2021

@pissang cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug en This issue is in English pending We are not sure about whether this is a bug/new feature.
Projects
None yet
Development

No branches or pull requests

2 participants