0

I'd like to implement a population pyramid in dc.js.

The goal is to benefit from all advantages of dc.js in terms of integration of d3 & crossfilter (i.e. my population pyramid would interact with all the other dimensions of my viz. I have already seen pretty good examples in d3 (for instance here: Creating Population Pyramid with D3.js ) put I am looking for a solution within dc.js.

My dataset has columns for each age & sex group.

I was initially thinking of using a "one bar rowchart" for each of those groups, use exactly the same axis scale and bring them together in what could look like a population pyramid.

Though this approach seems like not the right one as I will not be able to have a "one bar row chart" (i.e. I will always get at least 2 bars in my rowchart.

Any hints, ideas, suggestions or examples would be really appreciated.

Thanks!

Community
  • 1
  • 1
user3148607
  • 191
  • 11

1 Answers1

0

It might be easier to "simply" write a new graph type to dc. If you install dc.js from git and install grunt, you will be able to add a new pyramid graph in the src source file and get it into your dc.js

It's less scary that it sounds, have a look at existing graphs (rowchart or barchart are probably the closest to start for your own need).

Good luck and probably a good idea to join the dc mailing list, you might want to discuss the idea and get help if you get stuck somewhere

Xavier
  • 1,157
  • 9
  • 29
  • the enhancement request is here: https://github.com/dc-js/dc.js/issues/510 - this would be a welcome contribution! – Gordon Jan 15 '15 at 20:19
  • Sounds like this now implemented in **dc.pairedRowChart** : http://intellipharm.github.io/dc-addons/#paired-row – user3148607 Mar 27 '16 at 12:47