0

I've been working with dc.js and quite enjoyed the multiple time series, visualised as stacked charts.

However, I cannot figure out how to do a single-column stacked chart.

My dataset details air strikes. One row per strike, identifying a country, location, and all that stuff.

The idea is to have on a single column a stacks of different importance (area) depending on the number of strikes by each country. Such as in this image:

stacked

Thanks so much for your help!

basbabybel
  • 780
  • 8
  • 17
  • You should be able to use a stacked bar chart with a single key in the domain. Does this not work? – Gordon Dec 17 '14 at 16:35
  • I tried ```var xScaleDimension = ndx.dimension(function(d){ return 1; });``` as the dimension, then grouping and stacking on top of it - doesn't work. How do you mean *single key in the domain*? – basbabybel Dec 18 '14 at 12:00
  • Yes I was thinking something like that. Can you create a jsFiddle with what you've tried so far? – Gordon Dec 18 '14 at 14:14
  • @Gordon yep, you can [fing the jsfiddle here](http://jsfiddle.net/xhm0k4mv/) - watch out, big chunk of data at the top of the JS file – basbabybel Dec 18 '14 at 14:45
  • It looks like you still haven't managed to aggregate the data? Is this the same question as before? Maybe it would be better to continue that conversation, since there isn't any charting to do without data. :-) Also this may be more appropriate for the [dc.js users group](https://groups.google.com/forum/?fromgroups=#!forum/dc-js-user-group), since long comment chains are discouraged here. – Gordon Dec 18 '14 at 17:16
  • Cheers @Gordon I just posted in the dc.js users group - wait and see. I'm not too sure what you mean, though! – basbabybel Dec 19 '14 at 15:08

0 Answers0