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

[critical] Wrong tooltip event coordinate #1695

Closed
netil opened this issue Sep 25, 2020 · 4 comments
Closed

[critical] Wrong tooltip event coordinate #1695

netil opened this issue Sep 25, 2020 · 4 comments
Assignees
Milestone

Comments

@netil
Copy link
Member

netil commented Sep 25, 2020

Description

Due to the #1642 update, chart tooltip not showing correctly when chart's position changes dynamically.
And also in a cases for rotated axis chart, after doing some page scrolls don't work correctly.

Seems is critical, will be release a patch ASAP.

@netil netil added the bug label Sep 25, 2020
@netil netil added this to the Patch milestone Sep 25, 2020
@netil netil self-assigned this Sep 25, 2020
@netil netil changed the title Wrong tooltip event coordinate [critical] Wrong tooltip event coordinate Sep 25, 2020
netil added a commit to netil/billboard.js that referenced this issue Sep 25, 2020
Chart dimension can be updated dynamically.
Having this possibility, the new event <rect> event handling based on the
<rect> coordinate, need to be get updated to reflect current dimension.

For this, run <rect> coord update when mouseover/touchstar event is triggered.

Ref naver#1695
Ref naver#1642
@netil netil closed this as completed in b892515 Sep 25, 2020
netil pushed a commit that referenced this issue Sep 25, 2020
## [2.1.1](2.1.0...2.1.1) (2020-09-25)

### Bug Fixes

* **interaction:** Fix wrong tooltip event coordinate ([b892515](b892515)), closes [#1695](#1695) [#1642](#1642)
@creage
Copy link

creage commented Oct 9, 2020

@netil we are facing an issue with 2.1.1 - Tooltips are not displayed when we resize Bar chart. They are displayed in the area of initial chart size, but when chart is resized - this area remains the same. And moving mouse over the chart outside of initial size - does not display tooltip.

Can our issue be connected to this one, or do you want me to create new issue on it?

P.S. It works fine for Donut chart though.

SlowBS

@netil
Copy link
Member Author

netil commented Oct 10, 2020

@creage, can you provide reproducible code?

@creage
Copy link

creage commented Oct 10, 2020

@netil apparently this happens when you set resize: { auto: false }.

We handle chart resizing manually, detecting if there is enough space to render it, and we call chart.resize(dims) manually.

If we don't apply resize: { auto: false } - everything works fine. But we don't want charts to resize automatically.

P.S. It seems that <rect class="bb-event-rect"> element is not resizing when calling chart.resize() manually.

@netil
Copy link
Member Author

netil commented Oct 12, 2020

@creage, got it. resize.auto=false reproduce the issue.

@netil netil reopened this Oct 12, 2020
netil added a commit to netil/billboard.js that referenced this issue Oct 12, 2020
Update resizing state value when .resize() is called to
prevent when resize.auto=false is set.

Ref naver#1695
@netil netil closed this as completed in 6c12241 Oct 12, 2020
netil pushed a commit that referenced this issue Oct 12, 2020
## [2.1.2](2.1.1...2.1.2) (2020-10-12)

### Bug Fixes

* **api:** fix resizing event element ([6c12241](6c12241)), closes [#1695](#1695)
* **tooltip:** fix error throwing for tootip.show=false ([5164346](5164346)), closes [#1715](#1715)
* **zoom:** fix to work on point.focus.only ([af1dbd7](af1dbd7)), closes [#1703](#1703)
@netil netil added the released label Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants