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

V3 - Exception thrown on hover when visible dataset has no data #7022

Closed
etimberg opened this issue Jan 28, 2020 · 0 comments · Fixed by #7023
Closed

V3 - Exception thrown on hover when visible dataset has no data #7022

etimberg opened this issue Jan 28, 2020 · 0 comments · Fixed by #7023
Milestone

Comments

@etimberg
Copy link
Member

When a chart has a visible dataset that has no data, an exception is thrown on every mouse move.

Reproduce

https://codepen.io/etimberg/pen/LYEvKre

Stack Trace

Chart.js:8914 Uncaught TypeError: Cannot read property 'getRange' of undefined
    at binarySearch (Chart.js:8914)
    at optimizedEvaluateItems (Chart.js:8953)
    at getIntersectItems (Chart.js:9008)
    at index (Chart.js:9091)
    at Chart.getElementsAtEventForMode (Chart.js:11448)
    at Chart.handleEvent (Chart.js:11686)
    at Chart.eventHandler (Chart.js:11661)
    at listener (Chart.js:11572)
    at Chart.<anonymous> (Chart.js:10163)
    at Chart.js:9897

Workarounds

  • Set the dataset as not visible
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant