This document describes how to build a stacked barplot with subgroup highlighting available on hover. It follows the previous basic stacked barplot. Main stacked barchar caveats is that subgroups can be hard to compare since not aligned. Highlighting one allows to counter balance this issue.
d3.select(this.parentNode).datum().key
. Then it is easy to change the opacity of all rects to something low, and highlight the selected subgroup with a higher opacity.