The camera follows the strongest flow, then every other link draws in around it.

$npx kinetograph add sankey-chart
Source

Props

Every prop has a default, so the component renders as it is. Change any of them in Studio or in code.

  • nodes

    list

    The nodes.

  • links

    list

    The flows. They must run from earlier columns to later ones (no cycles).

  • startNode

    integer = 0

    Node the camera starts on; it follows that node's strongest flow on to the end.

  • title

    string = "Where visitors go"

    Heading.

  • subtitle

    string = "Sessions from first touch to checkout"

    Muted line under the heading.

  • unit

    string = "sessions"

    What a value counts, for the tooltip.

  • mode

    light | dark = "light"

    Colour theme: light or dark.

  • palette

    primary | monochrome | ocean | sunset | grove | vivid = "ocean"

    Chart palette: primary (indigo, yellow, fuchsia, mist, black), monochrome, ocean, sunset, grove or vivid.

  • hopSeconds

    number = 1.05

    Time the head takes along each hop of the followed flow.

  • holdSeconds

    number = 1.6

    How long the last frame holds.

  • camera.tightZoom

    number = 1.55

    Zoom while following the flow.

  • camera.wideZoom

    number = 1

    Zoom of the whole diagram.

  • camera.lead

    number = 200

    Screen pixels the camera leads the head by.

  • camera.motionBlur

    number = 1

    Strength of the motion blur on the fast moves; 0 turns it off.

  • camera.rackFocus

    number = 5

    Blur in pixels on the rest of the diagram as it arrives; it comes into focus.

Compositions

  • SankeyChart