Drag zoom loosing data points
See original GitHub issueHi
I am working on an implementation of the zoom plugin using the drag feature. I am following the samples/zoom-time.html
example. When i drag a zoom area, the resulting line chart looses data points. This happens in both my chart and the example chart.
Drag:
Result:
As you can see the first data point is gone and the resulting chart is off too. The result in mine is even more extreme with more of a flattening line. It kind of looks like the chart data is averaged instead of zoomed.
Here is the zoom config I am using:
zoom: {
enabled: true,
drag: true,
mode: 'x',
limits: {
max: 10,
min: 0.5
}
}
limits was in the example but I do not see in in chart.zoom.js
I’d love some help here 😃
Thanks,
Jordan
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:15 (2 by maintainers)
Top Results From Across the Web
Data point drag tool does not work correctly on zoomed charts
The point dragging does not respect the range of the displayed axes. The point can be dragged outside the chart and the axis...
Read more >D3 behave weird when I do a drag act which also trigger ...
Transitioning on zooming: The "expected" zoom behavior is that the point under the mouse pointer stays static while everything around the pointer zooms...
Read more >How can I zoom out past the default axis limits? - MathWorks
Zooming past the default axes has shown hidden data on previous Matlab versions, ... plot as usual; click the drag icon; then quickly...
Read more >Zoom in on the iPhone screen - Apple Support
Move the Zoom lens: (Window Zoom) Drag the handle at the bottom of the Zoom lens. Pan to another area: (Full Screen Zoom)...
Read more >Zooming into a time Interval on the time graphs
Drag the handles on the zoom controller to modify the time range. As you drag, the area between the drag points becomes shaded....
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
any progress on this?
The usage of the zoom functions when using the drag selection is pretty stupid, there is already a good function to get the value at a pixel. I refactored the mouse up handler, and it works perfectly now with a time graph. I haven’t tested it with non-time graphs, but it should work exactly the same.
If someone wants to submit a PR or fix it better, feel free to do so.