I'm trying to get the selection name and cannot find the substitute for d3.select(this.parentNode).datum().key as used in this example
.on("mouseover", (d, i, nodes) => {
const subgroupName = d3.select(nodes).datum().key; //d3.select(this.parentNode).datum().key;
console.log(subgroupName);
})
I tried using the 3rd node param in the mouse over function but not able to get the key and index in datum()
this.prentNode selects the top g however nodes are the rect inside the g. trying to find way to select the g element
How to get the selection key from data