Grouped stacked column
Budget and actual stacks side by side per quarter.
Open the chart without page chrome ↗
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "bar",
stacked: true,
toolbar: {
show: false
}
},
series: [
{
name: "Budget · People",
group: "budget",
data: [51, 57, 52, 55]
},
{
name: "Budget · Tools",
group: "budget",
data: [18, 20, 18, 19]
},
{
name: "Actual · People",
group: "actual",
data: [57, 45, 61, 41]
},
{
name: "Actual · Tools",
group: "actual",
data: [20, 21, 22, 10]
}
],
xaxis: {
categories: ["Q1", "Q2", "Q3", "Q4"]
},
colors: ["#2563eb", "#93c5fd", "#0d9488", "#5eead4"],
plotOptions: {
bar: {
columnWidth: "60%"
}
},
dataLabels: {
enabled: false
},
title: {
text: "Budget vs actual (k€)"
},
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: "bar",
stacked: true,
toolbar: {
show: false
}
},
series: [
{
name: "Budget · People",
group: "budget",
data: [51, 57, 52, 55]
},
{
name: "Budget · Tools",
group: "budget",
data: [18, 20, 18, 19]
},
{
name: "Actual · People",
group: "actual",
data: [57, 45, 61, 41]
},
{
name: "Actual · Tools",
group: "actual",
data: [20, 21, 22, 10]
}
],
xaxis: {
categories: ["Q1", "Q2", "Q3", "Q4"]
},
colors: ["#2563eb", "#93c5fd", "#0d9488", "#5eead4"],
plotOptions: {
bar: {
columnWidth: "60%"
}
},
dataLabels: {
enabled: false
},
title: {
text: "Budget vs actual (k€)"
},
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 column-grouped-stacked-column.json --out column-grouped-stacked-column.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/column/grouped-stacked-column/index.md …