Advanced timeline
Overlapping bars with data labels showing durations.
Open the chart without page chrome ↗
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "rangeBar",
toolbar: {
show: false
}
},
series: [
{
name: "Maya",
data: [
{
x: "Code review",
y: [1792677600000, 1792688400000]
},
{
x: "Pairing",
y: [1792656000000, 1792663200000]
},
{
x: "Planning",
y: [1792656000000, 1792663200000]
},
{
x: "On call",
y: [1792670400000, 1792684800000]
}
]
},
{
name: "Jon",
data: [
{
x: "Code review",
y: [1792670400000, 1792681200000]
},
{
x: "Pairing",
y: [1792674000000, 1792688400000]
},
{
x: "Planning",
y: [1792659600000, 1792670400000]
},
{
x: "On call",
y: [1792677600000, 1792688400000]
}
]
},
{
name: "Ines",
data: [
{
x: "Code review",
y: [1792666800000, 1792670400000]
},
{
x: "Pairing",
y: [1792670400000, 1792674000000]
},
{
x: "Planning",
y: [1792663200000, 1792677600000]
},
{
x: "On call",
y: [1792670400000, 1792674000000]
}
]
}
],
plotOptions: {
bar: {
horizontal: true,
barHeight: "80%"
}
},
dataLabels: {
enabled: true,
formatter: (v) => Math.round((v[1] - v[0]) / 36e5) + ' h'
},
xaxis: {
type: "datetime",
labels: {
datetimeUTC: true
}
},
fill: {
opacity: 0.85
},
legend: {
position: "top"
},
title: {
text: "Who does what today"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()import WestCoastCharts from 'west-coast-charts'
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "rangeBar",
toolbar: {
show: false
}
},
series: [
{
name: "Maya",
data: [
{
x: "Code review",
y: [1792677600000, 1792688400000]
},
{
x: "Pairing",
y: [1792656000000, 1792663200000]
},
{
x: "Planning",
y: [1792656000000, 1792663200000]
},
{
x: "On call",
y: [1792670400000, 1792684800000]
}
]
},
{
name: "Jon",
data: [
{
x: "Code review",
y: [1792670400000, 1792681200000]
},
{
x: "Pairing",
y: [1792674000000, 1792688400000]
},
{
x: "Planning",
y: [1792659600000, 1792670400000]
},
{
x: "On call",
y: [1792677600000, 1792688400000]
}
]
},
{
name: "Ines",
data: [
{
x: "Code review",
y: [1792666800000, 1792670400000]
},
{
x: "Pairing",
y: [1792670400000, 1792674000000]
},
{
x: "Planning",
y: [1792663200000, 1792677600000]
},
{
x: "On call",
y: [1792670400000, 1792674000000]
}
]
}
],
plotOptions: {
bar: {
horizontal: true,
barHeight: "80%"
}
},
dataLabels: {
enabled: true,
formatter: (v) => Math.round((v[1] - v[0]) / 36e5) + ' h'
},
xaxis: {
type: "datetime",
labels: {
datetimeUTC: true
}
},
fill: {
opacity: 0.85
},
legend: {
position: "top"
},
title: {
text: "Who does what today"
},
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 timeline-advanced.json --out timeline-advanced.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/timeline/advanced/index.md …