Socket
Book a DemoInstallSign in
Socket

d3-simple-sankey

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

d3-simple-sankey

Reusable Sankey graph visualization using d3.js

0.1.1
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

d3-simple-sankey

Reusable Sankey graph visualization using d3.js.

This is a very simple wrapper around http://bl.ocks.org/d3noob/5028304.

demo

Deprecation

In d3 >=4.0, you should use mbostock own d3-sankey plugin here https://github.com/d3/d3-sankey.

Installation

You can install d3-simple-sankey using npm:

npm install d3-simple-sankey

For Bower users, even if Bower is not officially supported, you can still use GitHub URL such as:

{
    "dependencies": {
        "eventDrops": "cerisier/d3-simpe-sankey#0.1.0"
    }
}

Usage

Include the dist/d3.sankey.min.js script in your page after d3:

<script src="path/to/d3.js"></script>
<script src="src/d3.sankey.min.js"></script>

In the HTML source, create a new Sankey chart, bind data to a DOM element, then call the chart on the element.

var chart = d3.chart.sankey();
d3.select('svg#chart')
  .datum(data)
  .call(chart);

See http://bl.ocks.org/d3noob/5028304 for the required data format.

Data example coming soon...

License

MIT

Keywords

d3

FAQs

Package last updated on 20 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.