Multi group
Three periods with two highlighted regions.
Open the chart without page chrome ↗
const options = {
chart: {
height: 420,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "slope",
toolbar: {
show: false
}
},
series: [
{
name: "North",
data: [101, 101, 95]
},
{
name: "South",
data: [97, 99, 97]
},
{
name: "East",
data: [106, 104, 101]
},
{
name: "West",
data: [105, 101, 108]
},
{
name: "Central",
data: [107, 115, 116]
},
{
name: "Central",
data: [93, 86, 93]
},
{
name: "Islands",
data: [108, 101, 95]
}
],
xaxis: {
categories: ["2022", "2024", "2026"]
},
plotOptions: {
slope: {
highlight: ["North", "Islands"]
}
},
title: {
text: "Revenue index by region"
},
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'
WestCoastCharts.use(types)
const options = {
chart: {
height: 420,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "slope",
toolbar: {
show: false
}
},
series: [
{
name: "North",
data: [101, 101, 95]
},
{
name: "South",
data: [97, 99, 97]
},
{
name: "East",
data: [106, 104, 101]
},
{
name: "West",
data: [105, 101, 108]
},
{
name: "Central",
data: [107, 115, 116]
},
{
name: "Central",
data: [93, 86, 93]
},
{
name: "Islands",
data: [108, 101, 95]
}
],
xaxis: {
categories: ["2022", "2024", "2026"]
},
plotOptions: {
slope: {
highlight: ["North", "Islands"]
}
},
title: {
text: "Revenue index by region"
},
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 slope-multi-group.json --out slope-multi-group.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/slope/multi-group/index.md …