Area with missing data
Areas with null gaps.
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: "Station 1",
data: [28, 26, 27, 24, 26, 30, null, null, null, 26, 29, 25, 27, 26, 25, 27, 27, 25, 28, 27]
},
{
name: "Station 2",
data: [16, 14, 13, 11, 12, 10, 7, 10, 12, 10, 9, 10, 8, null, null, 5, 5, 4, 3, 1]
}
],
xaxis: {
categories: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"]
},
dataLabels: {
enabled: false
},
stroke: {
width: 2
},
title: {
text: "Rainfall (mm), gaps where no reading"
},
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: "Station 1",
data: [28, 26, 27, 24, 26, 30, null, null, null, 26, 29, 25, 27, 26, 25, 27, 27, 25, 28, 27]
},
{
name: "Station 2",
data: [16, 14, 13, 11, 12, 10, 7, 10, 12, 10, 9, 10, 8, null, null, 5, 5, 4, 3, 1]
}
],
xaxis: {
categories: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"]
},
dataLabels: {
enabled: false
},
stroke: {
width: 2
},
title: {
text: "Rainfall (mm), gaps where no reading"
},
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-area-with-missing-data.json --out area-area-with-missing-data.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/area-with-missing-data/index.md …