Basic area
Weekly downloads as a smooth filled area.
Open the chart without page chrome ↗
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "area",
toolbar: {
show: false
}
},
series: [
{
name: "Downloads",
data: [3678, 3890, 4077, 3872, 4074, 4339, 4461, 4531, 4639, 4615, 4408, 4373, 4338, 4278, 4360, 4218, 3953, 3699, 3961, 3698, 3460, 3322, 3113, 2903, 2706, 2822]
}
],
xaxis: {
categories: ["W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8", "W9", "W10", "W11", "W12", "W13", "W14", "W15", "W16", "W17", "W18", "W19", "W20", "W21", "W22", "W23", "W24", "W25", "W26"]
},
dataLabels: {
enabled: false
},
stroke: {
curve: "straight",
width: 2
},
title: {
text: "Weekly downloads"
},
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: "area",
toolbar: {
show: false
}
},
series: [
{
name: "Downloads",
data: [3678, 3890, 4077, 3872, 4074, 4339, 4461, 4531, 4639, 4615, 4408, 4373, 4338, 4278, 4360, 4218, 3953, 3699, 3961, 3698, 3460, 3322, 3113, 2903, 2706, 2822]
}
],
xaxis: {
categories: ["W1", "W2", "W3", "W4", "W5", "W6", "W7", "W8", "W9", "W10", "W11", "W12", "W13", "W14", "W15", "W16", "W17", "W18", "W19", "W20", "W21", "W22", "W23", "W24", "W25", "W26"]
},
dataLabels: {
enabled: false
},
stroke: {
curve: "straight",
width: 2
},
title: {
text: "Weekly downloads"
},
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 area-basic-area.json --out area-basic-area.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/area/basic-area/index.md …