@times-visuals/sankey
v1.2.0
Published
Sankey
Downloads
8
Keywords
Readme
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} />;