This document describes how to build a stacked barplot with tooltip with d3.js. It follows the previous basic stacked barplot, and just extend it to show tooltip when a group is hovered. This example works with d3.js v4
and v6
d3.select(this.parentNode).datum().key