/d3-expandable-sankey

Expandable Sankey diagram based on d3-sankey-diagram

Primary LanguageJavaScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

d3-expandable-sankey

A Sankey diagram to show multiple levels of detail -- nodes expand when you click on them. Based on d3-sankey-diagram.

Installing

If you use NPM, npm install d3-expandable-sankey. Otherwise, download the latest release.

API Reference

# diagram.scale[(scale])

See d3.sankeyDiagram#scale.

# diagram.on(type[, listener])

Adds or removes an event listener for the specified type. The only supported type string is "clickNode". The listener is invoked with the context as the element and one argument, the corresponding data.

If listener is not specified, returns the currently-assigned listener for the specified type, if any.