4 ms·
"A truly interactive chart would let you zoom in and out ... and so on." dchester's comment (http://news.ycombinator.com/item?id=3340609 http://news.ycombinato
by douglashunter 15y ago
"A truly interactive chart would let you zoom in and out ... and so on."
dchester's comment (http://news.ycombinator.com/item?id=3340609 http://news.ycombinator.com/item?id=3340609) links to http://shutterstock.github.com/rickshaw/examples/extensions.html http://shutterstock.github.com/rickshaw/examples/extensions...., which demonstrates some of Rickshaw's interactions.
- lobster_johnson 15y agoOk, that example has a slider. That slider was hard to spot. Pretty awful choice of UI; wonder if the basic chart classes are designed to be extended with a better zoom UI? Also, what about fetching of remote data of variable resolution? I might have millions of data points on the server; I want the chart to fetch a subset of the data based on the current resolution and bounding box of the axis.
- douglashunter 15y ago"Ok, that example has a slider" It has two. There is one below the legend on the left hand side. That smooths your data by aggregating the plots. It also has the zoom slider under the graph. Or chart, rather. When you mouse over the series items on the top left corner, the data of the item you are mousing over is highlighted on the graph. You can uncheck some of those series items to focus on particular data, e.g. look at New York and Tokyo and London. You can re-order them by dragging them. You can switch the view between stacks, percentage, stream and lines. "Pretty awful choice of UI" There are some nice things that come with the slider across the bottom of the graph. When I grab an end of the slider and move it, I can see exactly what is happening to the data as I move it, and I can let my eye determine where I should settle. The question of "how do I get back" isn't on my mind. I know how to do that. I can pin the left hand side somewhere and watch new data come into view, or pin the right hand side somewhere to make the view momentarily static. "Also, what about fetching of remote data of variable resolution" You can fetch your data however you want to. Edit: I forgot to mention that the zoom slider there is just a DOM element. You can dress it up any which way.
- lobster_johnson 15y ago> That smooths your data by aggregating the plots. I'm confused about what the smoothing is supposed to be doing, since it's changing the X axis. I would have expected it maintain the X axis and simply choose fewer points (and use an averaging algorithm to produce smooth curves). When aggregating, can one easily insert a "rug" plot (see http://www.cl.cam.ac.uk/~sjm217/projects/graphics/faithful.html http://www.cl.cam.ac.uk/~sjm217/projects/graphics/faithful.h...) to indicate sample frequency? The slider, though, has several problems: - Lacks labels. The slider operates on some unknown scale of values. So I can't use it to zoom in/out to a specific time range, for exampel. - Once I have found a zoomed subset, the slider does not let me scroll within it. Clicking on the "filled" part of the slider should modify the subset. - In fact, there's no way to scroll at all. - There's no single mechanism to zoom out. Zooming out requires two drag operations. Yes, I'm sure this is just an example, but the main reason to use a chart library is so you don't have write one yourself, which is why I'm asking about these things. I have a specific app in mind that requires time-series charts, but I'm still looking for the right library that gives me the features I need. I looked at Dygraphs (http://dygraphs.com/ http://dygraphs.com/) but it seems a bit limited.
- douglashunter 15y ago"I'm confused about what the smoothing is supposed to be doing" If you have, for example, 300 data plots collected once a second for 5 minutes, and that looks too noisy when you paint your chart, you may choose to smooth the lines by aggregating the data into buckets that are larger than a second. For instance, you might choose to sum all the plots in a minute, and divide that sum by the number of plots that were in that minute, thus reducing 60 plots to one while retaining an accurate representation of your data. When you drag that slider, you are aggregating data into larger buckets. Good luck in your travels finding a chart library that works for your application, and if you try Rickshaw and hit any stumbling blocks, hit us up on github. Cheers!
- danvk 15y agoI'm curious what ways you found dygraphs "a bit limited". It can do quite a bit more than people realize at first glance.