The bars here are nicely grouped ordinally by "saif" (top level item) categories which is something I actually wanted to achieve but the bars in each of these ordinal categories overlap rather than stack. I made them 0.2 transparent so this can be easily tracked. I would love to get some guidance as to how may I be able to aggregate the total per 'saif' and to stack them accordingly.
Modified http://d3js.org/d3.v3.js to a secure url
https://d3js.org/d3.v3.js