Coder Social home page Coder Social logo

Comments (8)

keithknott26 avatar keithknott26 commented on July 27, 2024

This would be very helpful!

from termdash.

mum4k avatar mum4k commented on July 27, 2024

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.

keithknott26 avatar keithknott26 commented on July 27, 2024

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.

image

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.

mum4k avatar mum4k commented on July 27, 2024

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.

mum4k avatar mum4k commented on July 27, 2024

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.

mum4k avatar mum4k commented on July 27, 2024

With the work for #123 and #21 done, this became much easier.

Going to look at this next.

from termdash.

keithknott26 avatar keithknott26 commented on July 27, 2024

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.

mum4k avatar mum4k commented on July 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.