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

eventRect is undefined #1752

Closed
creage opened this issue Nov 2, 2020 · 1 comment
Closed

eventRect is undefined #1752

creage opened this issue Nov 2, 2020 · 1 comment
Assignees

Comments

@creage
Copy link

creage commented Nov 2, 2020

Description

Manual resizes of a chart sometimes causes an undefined reference in updateEventRect() call, when is executed by binding created in generateEventRectsForSingleX() in this code

 rect.on("mouseover", function () { return $$.updateEventRect(); })                

updateEventRect() expects an argument, while the binding above does not pass any.

Steps to check or reproduce

Create a chart, set auto resizing to false.

Call a resize manually (from code), and try to mouseover the chart while it is being resized.

node_modules\billboard.js\dist\billboard.esm.js:11242 

Uncaught TypeError: Cannot read property 'attr' of undefined
    at ChartInternal.updateEventRect (node_modules\billboard.js\dist\billboard.esm.js:11242)
    at SVGRectElement.eval (node_modules\billboard.js\dist\billboard.esm.js:11408)
    at SVGRectElement.eval (node_modules\d3-selection\src\selection\on.js:27)
@netil
Copy link
Member

netil commented Nov 3, 2020

Hi @creage, thanks for the report. I'll check the issue.

@netil netil added the bug label Nov 3, 2020
@netil netil self-assigned this Nov 3, 2020
netil added a commit to netil/billboard.js that referenced this issue Nov 3, 2020
Make sure referencing event rect element when updating event rect's
dimension.

Ref naver#1752
@netil netil closed this as completed in 38568c1 Nov 3, 2020
netil pushed a commit that referenced this issue Nov 11, 2020
## [2.1.4](2.1.3...2.1.4) (2020-11-11)

### Bug Fixes

* **api:** fix tooltip showing when lesser data loaded ([74320cf](74320cf)), closes [#1761](#1761)
* **event:** fix referencing event element ([38568c1](38568c1)), closes [#1752](#1752)
* **gauge:** fix to be consistent max label value ([0c2006f](0c2006f)), closes [#1759](#1759)
* **radar:** fix labels showing on esm usage ([d56ff52](d56ff52)), closes [#1765](#1765)
* **shape:** shape not showing on ie11 ([d1366d1](d1366d1)), closes [#1758](#1758)
* **tooltip:** fix to reset pending events from .show() ([ce8210c](ce8210c)), closes [#1753](#1753)
* **zoom:** fix throwing TypeError during zoom  ([f2787fa](f2787fa)), closes [#1760](#1760)
@netil netil added the released label Nov 11, 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