Sankey HTTP API

POST /charts/sankey

The Sankeycomponent is available in the nivo HTTP rendering API. The API generates a SVG and return a path to this SVG which can then be easily embedded.

The api accepts almost the same properties as the regular component, in json, however it's not interactive and you cannot use code in properties (functions).

Please note that the demo API server is installed on heroku using a free plan, so it might be unavailable from times to times.

Click the generate button in order to generate the chart.
You can customize settings by using dedicated controls.
generate
Response n/a
no response available
Base
{ nodes: object[], links: object[] }required
Chart data.
stringoptionaldefault:'horizontal'
Control sankey layout direction.
stringoptionaldefault:'center'
justify
Node alignment method.
string | Functionoptionaldefault:'auto'
auto
Node sorting method.
string | Function | string[]optionaldefault:{"scheme":"nivo"}
category10
Defines how to compute nodes color.
numberrequired
Chart width.
numberrequired
Chart height.
objectoptional
px
px
px
px
Chart margin.
Nodes
numberoptionaldefault:12
px
Node thickness.
numberoptionaldefault:0.75
Node opacity (0~1).
numberoptionaldefault:1
Node opacity on hover (0~1).
supportsvgapi
numberoptionaldefault:12
px
Spacing between nodes at an identical level.
numberoptional
px
Node inner padding, distance from link, substracted from nodeThickness.
numberoptionaldefault:1
px
Node border width.
string | object | Functionoptionaldefault:{"from":"color","modifiers":[["darker",0.5]]}
inheritthemecustom
inherited property
color
modifiers
darker
Method to compute node border color.
Links
Labels
booleanoptionaldefault:true
   Enable/disable labels.
stringoptionaldefault:'inside'
Label position.
numberoptionaldefault:9
px
Label padding from node.
string | object | Functionoptionaldefault:{"from":"color","modifiers":[["darker",0.8]]}
inheritthemecustom
inherited property
color
modifiers
darker
Method to compute label text color.
stringoptionaldefault:'horizontal'
Label orientation.
Interactivity
booleanoptionaldefault:true
Enable/disable interactivity.
supportsvgapi
Motion
booleanoptionaldefault:true
Enable/disable transitions.
supportsvgapi
numberoptionaldefault:90
Motion stiffness.
supportsvgapi
numberoptionaldefault:15
Motion damping.
supportsvgapi