One of the challenges with stacked bar charts is comparing values across bars, since the baseline is offset for all except the bottom layer. In this version, the entire layer is highlighed on mouseover, the bars adjust vertically to match up the layer baseline, and the y axis shifts to set the baseline to zero.
One remaining issue with this approach is that some bars may move above the top of the visualization. Any suggestions on how to deal with this best would be welcome!
Earlier versions:
Part I
Part II
Originally forked from mbostock's block: Stacked-to-Grouped Bars
Updated for D3 4.0
forked from chornbaker's block: Stacked-to-Grouped Bars III
forked from lorenzopub's block: Stacked-to-Grouped Bars III
forked from Thanaporn-sk's block: Stacked-to-Grouped Bars III
https://d3js.org/d3.v4.min.js