Skip to content
Britt Sikora edited this page Mar 28, 2017 · 19 revisions

Overview

interactive-sankey is a JavaScript library, built using Webcharts, (1, 2) that creates an interactive Sankey chart that visualizes changes in state. The chart expects a data structure of one record per ID per node, where each ID holds a certain state at each node. Full details about chart configuration can be found here.

Typical Usage

A typical chart created with interactive-sankey looks like this:

Example

Users can click on any bar to view the changes in state of only those IDs present in that node/state. The code to initialize an interactive Sankey chart looks like this:

    var container = 'body';
    var settings =
        {id_col: 'ID'
        ,node_col: 'Node'
        ,link_col: 'State'};
    d3.csv('sankeyData.csv', function (data) {
        interactiveSankey(container, settings).init(data);
    });

Click here to open an interactive version of the chart shown above.

Examples

Clone this wiki locally