Skip to content

Commit

Permalink
Mouseover highlighting in sankey diagram.
Browse files Browse the repository at this point in the history
  • Loading branch information
KirkMcDonald committed Oct 10, 2024
1 parent ee90cf8 commit e4b1eb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ export function renderSankey(data, ignore) {
.attr("y", d => d.rect.y)
.attr("width", d => d.rect.width)
.attr("height", d => d.rect.height)
//.on("click", toggleIgnoreHandler)
.on("mouseover", (event, d) => d.node.highlight())
.on("mouseleave", (event, d) => d.node.unhighlight())
.append("title")
.text(d => d.node.name + (d.node.count.isZero() ? "" : `\n${d.node.building.name} \u00d7 ${spec.format.count(d.node.count)}`))
}

0 comments on commit e4b1eb9

Please sign in to comment.