Why nested stacked barchart?
Long ago, after i learned how to use d3 stacked barchart, i attempted to use it to describe real life data of my country’s civil servants hierarchical structure.
And immediatelly realized the limitation of the standard d3 stacked barchart : it can only ‘divided’ itself once. In other words : it only capable of a single depth level structure.
While in real life : data can be structured deeper than a single level.
I then googled the keyword ‘d3js nested stacked barchart’, and came to no satisfying result whatsoever, seems like everybody in the d3 community is using d3 stack layout or d3 hierarchical barchart to solve problems.
So, i decided to do the calculations myself, and after a lot of time and efforts, here is the result : a stacked barchart which have 2 levels of depth! Just play arround with the controls, and mouseover/touch the bar(s).
Note : experimental, still not perfect.
The fullwidth version of this graph is here :
And the Indonesian version of fullwidth view here :