-
Notifications
You must be signed in to change notification settings - Fork 134
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
Support zooming of the LineChart. #55
Comments
This would be very helpful! |
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? |
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! |
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? |
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? |
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. |
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. |
Rotation of the mouse wheel or key presses could adjust the scale.
The text was updated successfully, but these errors were encountered: