1.2.0 • Published 5 years ago

@times-visuals/sankey v1.2.0

Weekly downloads
-
License
BSD-3-Clause
Repository
-
Last release
5 years ago

Sankey

A Sankey template using D3.js

Installation

# Yarn
$ yarn add @times-visuals/sankey

# npm
$ npm add @times-visuals/sankey

Usage

Data structure:

{
"nodes": [
{ "node": 0, "name": "Conservative" },
{ "node": 1, "name": "Labour" },
    ],
"links": [
{ "source": 0, "target": 1, "value": 100 },
    ]
}
import Sankey from '@times-visuals/sankey';

export default () => <Sankey data={data} onHover={function} />;