Linie, Säule und Fläche
Drei verschiedene Reihenarten in einem Diagramm.
Diagramm ohne Website-Rahmen öffnen ↗
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "line",
stacked: false,
toolbar: {
show: false
}
},
series: [
{
name: "Visitors",
type: "area",
data: [427, 467, 437, 429, 584, 519, 371, 428, 415, 573, 538]
},
{
name: "Sign-ups",
type: "column",
data: [53, 107, 112, 104, 112, 74, 41, 77, 41, 81, 106]
},
{
name: "Trend",
type: "line",
data: [86, 82, 86, 85, 82, 80, 82, 83, 86, 87, 85]
}
],
stroke: {
width: [0, 0, 3],
curve: "smooth"
},
fill: {
opacity: [0.25, 0.9, 1]
},
plotOptions: {
bar: {
columnWidth: "45%"
}
},
xaxis: {
categories: ["Jan 1", "Jan 8", "Jan 15", "Jan 22", "Jan 29", "Feb 5", "Feb 12", "Feb 19", "Feb 26", "Mar 5", "Mar 12"]
},
title: {
text: "Funnel top, middle and trend"
},
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: "line",
stacked: false,
toolbar: {
show: false
}
},
series: [
{
name: "Visitors",
type: "area",
data: [427, 467, 437, 429, 584, 519, 371, 428, 415, 573, 538]
},
{
name: "Sign-ups",
type: "column",
data: [53, 107, 112, 104, 112, 74, 41, 77, 41, 81, 106]
},
{
name: "Trend",
type: "line",
data: [86, 82, 86, 85, 82, 80, 82, 83, 86, 87, 85]
}
],
stroke: {
width: [0, 0, 3],
curve: "smooth"
},
fill: {
opacity: [0.25, 0.9, 1]
},
plotOptions: {
bar: {
columnWidth: "45%"
}
},
xaxis: {
categories: ["Jan 1", "Jan 8", "Jan 15", "Jan 22", "Jan 29", "Feb 5", "Feb 12", "Feb 19", "Feb 26", "Mar 5", "Mar 12"]
},
title: {
text: "Funnel top, middle and trend"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render() Warten auf das Diagramm.
Open Data & agent view to read this chart through chart.describe().
Aus der laufenden Bibliothek über das optionale agent/describe -Modul gelesen. Text, Tabelle und JSON zeigen denselben Zustand. Ausschließlich Demonstrationsdaten.
$ wcc chart export mixed-line-column-area.json --out mixed-line-column-area.svg --with-table Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Speichern Sie zuerst eine JSON-Spezifikation und prüfen Sie vor dem Rendern die geladene Runtime und die unterstützten Module. Befehlsreferenz
Loading /gallery/mixed/line-column-area/index.md …