mirror of
https://github.com/mum4k/termdash.git
synced 2026-04-27 03:15:55 +03:00
[GH-ISSUE #55] Support zooming of the LineChart. #44
Labels
No labels
bug
cleanup
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/termdash#44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mum4k on GitHub (Jun 22, 2018).
Original GitHub issue: https://github.com/mum4k/termdash/issues/55
Rotation of the mouse wheel or key presses could adjust the scale.
@keithknott26 commented on GitHub (Feb 12, 2019):
This would be very helpful!
@mum4k commented on GitHub (Feb 13, 2019):
I haven't given this much thought yet, i.e. how this would work or which part of the linechart or which of the axes would be zoomed.
Maybe you could help me by describing your use case and how you would envision the zoom working?
@keithknott26 commented on GitHub (Feb 13, 2019):
I'm building a data visualization app similar to termeter where you can pipe in columned data from stdin or a flat file and have it display on linegraphs. This is for visualizing data in an application environment (client server) requests per minute, etc. It would be helpful to be able to zoom in on each graph to see the spikes and in particular which precise label the data spike maps to, I like the idea of using the mouse scroll wheel to quickly zoom in / out on a particular segment of data and have the labels also scale accordingly. I've attached a screenshot of my use case.
I'm not sure where to ask this question, but is there a way to anchor the maxYValue on the graph? My data Xseries continually changes (the graphs scroll from right to left) so the scale changes along with the data. I was hoping there was a way to anchor the graph at a particularl Yvalue to effectively disable the autoscaling/adaptive scaling feature. I'll continue looking over your code, in particular the value, label, and scale sections of the linegraph code.
I think what you've done so far is really impressive, nice work!
Cheers!
@mum4k commented on GitHub (Feb 13, 2019):
Re zooming - thank you for providing the screenshot and explanation. So if I understand this correctly you are interested in zooming the X, i.e. the data axis. Not the Y, i.e. the value axis, right?
Such zoom would just change the first or the last data point that is displayed on the X axis and the scale of the Y axis would adapt to the new minimum and maximum in the visible range?
Re Y anchoring - that is a feature I was considering, I have created #121, would you mind helping me by putting your thoughts there?
@mum4k commented on GitHub (Feb 14, 2019):
While looking for linecharts with zoom, I found this:
https://www.amcharts.com/demos/line-chart-with-scroll-and-zoom/
And I think it is a fairly interesting mechanic. Notice that the zoom isn't done using a mouse scroll, but instead by selecting an area on the linechart. I.e. left click + drag onto the linechart to highlight an area that should be zoomed into.
We should ignore the animation for now as currently the termdash infrastructure doesn't allow widgets to force a screen redraw, but I would be interested to hear your opinion on the control mechanic. Would something like this work for your use case?
@mum4k commented on GitHub (Feb 16, 2019):
With the work for #123 and #21 done, this became much easier.
Going to look at this next.
@keithknott26 commented on GitHub (Feb 16, 2019):
Being able to select a portion of the line graph with the mouse and dragging to the left or right to select a series of "cells" would zoom in on the graph and put the appropriately "scaled" labels underneath? This is a fantastic idea, I considered suggesting exactly that but figured it would be too difficult to implement. Thank you for taking this on, that is truly a great feature. As far as your most recent changes to the line graph - I have some time this weekend to test using your latest development branch using my app and a large dataset.
@mum4k commented on GitHub (Feb 18, 2019):
This is now available in the devel branch.
I would appreciate if you could give it a try. If all looks good we could release what's in the devel branch, since we have accumulated a few features by now.