Comments (8)
This would be very helpful!
from termdash.
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?
from termdash.
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!
from termdash.
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?
from termdash.
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?
from termdash.
With the work for #123 and #21 done, this became much easier.
Going to look at this next.
from termdash.
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.
from termdash.
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.
from termdash.
Related Issues (20)
- Widget: heat map HOT 3
- termdash makes debugging panics difficult HOT 19
- Support styling across termdash HOT 2
- Termdash crashes on terminal resize with tcell
- Allow SplitFixed to set the size of the second container HOT 11
- Circular / Ring Buffer for Text Widget HOT 3
- Tracking container focus HOT 3
- How to display the cursor position and color of textinput in Linux environment? HOT 4
- How to use in tview HOT 8
- options that set foreground / background color don't seem to be propagated to tcell HOT 8
- allow non-adaptive custom scale HOT 20
- add dim text style as cell.Option HOT 1
- adding text styles has no effect on Windows HOT 5
- bar chart with signed values HOT 2
- panic: unknown tcell event type: <nil> HOT 1
- Place two buttons one onto of each other
- How do I change the font size of text charactor? HOT 2
- Add list widget HOT 1
- How to add sub-container with id HOT 1
- Panic when attempting to use Backtab HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from termdash.