Charts

Journey Sankey

User journeys as columns of steps, with path highlighting and drop-off

A journey Sankey shows how sessions move through a site. Each column is a step, each node a page at that step, and each band the sessions that went from one page to the next. Hovering a band or a page highlights every path connected to it; the grey part of a node shows the sessions that ended there.

Give the chart whole journeys: the pages in order and how many sessions took each one.

const journeys = [
  { path: ['/', '/pricing'], count: 6 },
  { path: ['/', '/pricing', '/', '/docs'], count: 2 },
]

From journeys the chart knows what plain node and link data cannot tell: how many sessions ended at a node (the grey segment and the "end here" share), and the exact journey to pin when you click. The same page at different steps is a different node.

If your journeys were cut before they reached the chart (for example, "top 15 paths, 4 steps deep" where longer sessions were truncated), set :exits-known="false". The last column never claims exits, because longer journeys continue past it.

Highlight and pin

  • Hover a band or a page: every band on a path through it stays visible (0.45 opacity), the others fade to 0.07, and unrelated pages fade.
  • Click a band or a page to pin the largest journey through it; click again to unpin. Bind v-model:pinned to read or set the pinned journey, for example to show it as a filter.
  • Keyboard: focus the chart, move with the arrow keys (up and down within a step, left and right along the largest band), Enter or Space pins the focused node and emits node-click, Escape clears.

Props

PropTypeDefaultDescription
dataRow[]requiredOne row per journey
path-key / data-keyrow path or accessor'path' / 'count'Fields for the steps and the session count
stepsnumberlongest journeyColumns to show; longer journeys are cut
exits-knownbooleantrueWhether a journey's end means the session ended
colorstringvar(--v-charts-series-1, var(--v-charts-series, #2563eb))Bands and nodes
exit-colorstringvar(--v-charts-inactive, #a3a3a3)The "ended here" part of a node
node-width / node-paddingnumber8 / 8Node bar width and space between nodes
pinnedstring[] | null—Pinned journey, for v-model
headersbooleantrueStep headers with totals and the share of the previous step
node-href(name, node) => string | undefined—Turns page names into links
subtitle-formatter(node) => string'11 · 55% end here'Second line under each name; use it to translate
localestring'en-US'Number format
width / height / aspectnumberfull width, room for every labelSize

Events and slots

PayloadDescription
@node-click / @link-click(node | link, index, event)Fired after pinning; event is a KeyboardEvent for Enter or Space on a node
@node-mouseenter / @node-mouseleave(node, index, event)Node hover events
@link-mouseenter / @link-mouseleave(link, index, event)Link hover events
#header{ step, x, total, previousTotal, width }Replace a step header, for example to add a filter menu
#label{ node, subtitle }Replace a node's label, drawn right of the node
default slot—Place <Tooltip> here

Compared with Sankey

Sankey lays out any flow graph from nodes and links (budgets, energy). JourneySankey is for ordered steps: it keeps pages in columns, knows where sessions ended, and can pin exact journeys.

The row type Row is inferred from data. Key props accept typed row paths or accessors.

Node indexes address the layout node list; link indexes address the layout link list. JourneyNode<Row>.rows and JourneyLink<Row>.rows contain the contributing source rows. Events, labels and tooltip payloads retain the derived layout object.

Copyright © 2026