Hacker News new | ask | show | jobs
by thom_nic 4308 days ago
Does anyone know of a chart lib has the ability to make a "stacked" area chart where each series gets its own Y-axis, similar to cubism.js?

I like how cubism visualizes streams of data where each needs its own Y-axis but they are related on the X axis (usually a time domain.) However cubism's mechanism of updating is sort of weird, and each value needs to be one pixel. I tried to use d3's "streams" example but quickly got lost there.

On another note, I've had good luck using Rickshaw and updating the `graph.series[i].data` array using shift and push then re-calling `graph.render()`. This is what Rickshaw's `FixedDuration` appears to do under the covers (see source of this example http://code.shutterstock.com/rickshaw/examples/fixed.html) - but I don't actually use FixedDuration, just update the data array.

1 comments

I think of those stacked charts as a stack of multiple charts that happen to share a timeline. With rickshaw I just stack a bunch of graphs on top of each other in the page, and give the bottom one an X axis.
Yup that's what I'm doing now as well.

The only downside to that strategy is you can't e.g. show a single y-axis with values for each chart when you hover over one the way cubism can. This is really handy for comparing values across series. Actually I just found a d3.horizon module which might do what I want, but I need to see if I could get multiple charts to share the same axis.

Maybe I should just go back to cubism but it doesn't really make sense when you don't have thousands of values that you want to be 1px wide.