Playback
Quarterly frames with play / pause and a scrubber built in.
Open the chart without page chrome ↗Drawing width at least 900 px. Scroll within the chart on smaller screens.
const options = {
chart: {
height: 420,
toolbar: {
show: false
},
type: "sankey"
},
series: [
{
data: [
["Organic", "Sign-ups", 380],
["Paid", "Sign-ups", 290],
["Partners", "Sign-ups", 110],
["Sign-ups", "Activated", 500],
["Sign-ups", "Dormant", 280],
["Activated", "Paying", 210],
["Activated", "Free", 290]
]
}
],
plotOptions: {
sankey: {
playback: {
frames: [
{
label: "Q1",
data: [
["Organic", "Sign-ups", 380],
["Paid", "Sign-ups", 290],
["Partners", "Sign-ups", 110],
["Sign-ups", "Activated", 500],
["Sign-ups", "Dormant", 280],
["Activated", "Paying", 210],
["Activated", "Free", 290]
]
},
{
label: "Q2",
data: [
["Organic", "Sign-ups", 490],
["Paid", "Sign-ups", 440],
["Partners", "Sign-ups", 165],
["Sign-ups", "Activated", 640],
["Sign-ups", "Dormant", 395],
["Activated", "Paying", 285],
["Activated", "Free", 355]
]
},
{
label: "Q3",
data: [
["Organic", "Sign-ups", 600],
["Paid", "Sign-ups", 290],
["Partners", "Sign-ups", 220],
["Sign-ups", "Activated", 780],
["Sign-ups", "Dormant", 330],
["Activated", "Paying", 360],
["Activated", "Free", 420]
]
},
{
label: "Q4",
data: [
["Organic", "Sign-ups", 710],
["Paid", "Sign-ups", 440],
["Partners", "Sign-ups", 275],
["Sign-ups", "Activated", 920],
["Sign-ups", "Dormant", 445],
["Activated", "Paying", 435],
["Activated", "Free", 485]
]
}
],
autoplay: true
}
}
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'
import premium from 'west-coast-charts/premium'
WestCoastCharts.use(types).use(premium)
const WestCoastChartsPremium = premium
WestCoastCharts.setLicenseKey(LICENCE_KEY) // paid production licence; localhost evaluation needs no key
const options = {
chart: {
height: 420,
toolbar: {
show: false
},
type: "sankey"
},
series: [
{
data: [
["Organic", "Sign-ups", 380],
["Paid", "Sign-ups", 290],
["Partners", "Sign-ups", 110],
["Sign-ups", "Activated", 500],
["Sign-ups", "Dormant", 280],
["Activated", "Paying", 210],
["Activated", "Free", 290]
]
}
],
plotOptions: {
sankey: {
playback: {
frames: [
{
label: "Q1",
data: [
["Organic", "Sign-ups", 380],
["Paid", "Sign-ups", 290],
["Partners", "Sign-ups", 110],
["Sign-ups", "Activated", 500],
["Sign-ups", "Dormant", 280],
["Activated", "Paying", 210],
["Activated", "Free", 290]
]
},
{
label: "Q2",
data: [
["Organic", "Sign-ups", 490],
["Paid", "Sign-ups", 440],
["Partners", "Sign-ups", 165],
["Sign-ups", "Activated", 640],
["Sign-ups", "Dormant", 395],
["Activated", "Paying", 285],
["Activated", "Free", 355]
]
},
{
label: "Q3",
data: [
["Organic", "Sign-ups", 600],
["Paid", "Sign-ups", 290],
["Partners", "Sign-ups", 220],
["Sign-ups", "Activated", 780],
["Sign-ups", "Dormant", 330],
["Activated", "Paying", 360],
["Activated", "Free", 420]
]
},
{
label: "Q4",
data: [
["Organic", "Sign-ups", 710],
["Paid", "Sign-ups", 440],
["Partners", "Sign-ups", 275],
["Sign-ups", "Activated", 920],
["Sign-ups", "Dormant", 445],
["Activated", "Paying", 435],
["Activated", "Free", 485]
]
}
],
autoplay: true
}
}
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render() Waiting for the chart.
Open Data & agent view to read this chart through chart.describe().
Read from the running library through its optional agent/describe module. Text, table and JSON share the same snapshot. Demo data only.
$ wcc chart export sankey-playback.json --out sankey-playback.svg --with-table Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Save a JSON spec first and check the loaded runtime and supported modules before rendering. Command reference
Loading /gallery/sankey/playback/index.md … This example uses Premium modules. Compare licences · Embedding in a distributed product?