TypeError when zooming between datapoints
See original GitHub issueAn 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:
- v1.0.7
- v1.0.8
- 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
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
D3 Zooming not working - Stack Overflow
I've created an elevation chart by plotting a separate area for each segment of 3-5 data points. So, I have quite a few...
Read more >zoom into open-ended regions not working | CanvasJS Charts
To zoom into a certain region, there should be a minimum of 3-4 dataPoints over the axis. Please refer to this forum thread...
Read more >@syncfusion/ej2-charts - npm
Zooming and panning: Provides options to visualize the data points under any region using rectangular selection, pinch, or mouse wheel zooming.
Read more >SOLVED - Uncaught TypeError: Cannot read property 'enable ...
I can zoom with scroll wheel but no mouse-click events register on the chart area and the pointer is stuck at a hand...
Read more >plotly.express.scatter — 5.11.0 documentation
In a scatter plot, each row of data_frame is represented by a symbol mark in ... range_color (list of two numbers) – If...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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 customscales.y.range
.https://jsfiddle.net/x8wsmg2a/
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.