TypeError when zooming between datapointsSee original GitHub issue
An error that I’ve encountered when working on LiveDashboard., but I think it makes more sense to describe it here. 😃
Reproduced the error with following versions:
- Latest master
When trying to zoom in I sometimes encounter:
TypeError: Cannot read property '2' of undefined
Screenshot from the inspector:
How to reproduce (with phoenix livedashboard):
As far as I can tell this happens when trying to zoom (by selecting an area with the mouse) and the selected area does not include any datapoints.
- Open LiveDashboard
- Click metrics -> VM
- Wait for a datapoint (or two) to load
- Try zooming in in a space between datapoints
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
y auto-scaling ain’t gonna work when there’s nothing in the view to scale by.
you can either prevent zooming to locations with no datapoints by defining a custom
scales.x.range or returning some fallback min/max in a custom
updated to the latest repo, havent seen this error so far. actually I am not sure what triggers it, just noticed that using mouse wheel for zooming did it more, and it is hard for user to check data with mouse movement. thanks.