Gedrängte Währungsbeschriftungen
Zwölf monatliche Schritte in Euro sowie eine Gesamtsumme.
Why it matters compact € labels from 100 000, collision pass hides or moves labels instead of overlapping; at 390 px labels thin out
Diagramm ohne Website-Rahmen öffnen ↗
// First chart on this page. The example combines several charts or controls;
// open the standalone example for the full source.
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "waterfall",
toolbar: {
show: false
}
},
series: [
{
name: "Result",
data: [
{
x: "Start",
y: 2400000
},
{
x: "Jan",
y: -237703
},
{
x: "Feb",
y: -49106
},
{
x: "Mar",
y: 590955
},
{
x: "Apr",
y: 99654
},
{
x: "May",
y: 502312
},
{
x: "Jun",
y: -323467
},
{
x: "Jul",
y: 624912
},
{
x: "Aug",
y: -85471
},
{
x: "Sep",
y: -83745
},
{
x: "Oct",
y: 326256
},
{
x: "Nov",
y: -293895
},
{
x: "Dec",
y: 427204
},
{
x: "Year",
isTotal: true
}
]
}
],
dataLabels: {
formatter: (val) => ((v) => { if (v == null || isNaN(v)) return '–'; const a = Math.abs(v), s = v < 0 ? '\u2212' : ''; if (a >= 1e9) return s + '€' + (Math.round(a / 1e8) / 10) + 'B'; if (a >= 1e6) return s + '€' + (Math.round(a / 1e5) / 10) + 'M'; if (a >= 1e4) return s + '€' + (Math.round(a / 100) / 10) + 'k'; return s + '€' + Math.round(a).toLocaleString('en'); })(val)
},
yaxis: {
labels: {
formatter: (val) => ((v) => { if (v == null || isNaN(v)) return '–'; const a = Math.abs(v), s = v < 0 ? '\u2212' : ''; if (a >= 1e9) return s + '€' + (Math.round(a / 1e8) / 10) + 'B'; if (a >= 1e6) return s + '€' + (Math.round(a / 1e5) / 10) + 'M'; if (a >= 1e4) return s + '€' + (Math.round(a / 100) / 10) + 'k'; return s + '€' + Math.round(a).toLocaleString('en'); })(val)
}
},
title: {
text: "Monthly result 2026 (€)"
},
theme: {
mode: "light",
preset: "coastal"
}
}import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'
WestCoastCharts.use(types)
const options = {
chart: {
height: 380,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "waterfall",
toolbar: {
show: false
}
},
series: [
{
name: "Result",
data: [
{
x: "Start",
y: 2400000
},
{
x: "Jan",
y: -237703
},
{
x: "Feb",
y: -49106
},
{
x: "Mar",
y: 590955
},
{
x: "Apr",
y: 99654
},
{
x: "May",
y: 502312
},
{
x: "Jun",
y: -323467
},
{
x: "Jul",
y: 624912
},
{
x: "Aug",
y: -85471
},
{
x: "Sep",
y: -83745
},
{
x: "Oct",
y: 326256
},
{
x: "Nov",
y: -293895
},
{
x: "Dec",
y: 427204
},
{
x: "Year",
isTotal: true
}
]
}
],
dataLabels: {
formatter: (val) => ((v) => { if (v == null || isNaN(v)) return '–'; const a = Math.abs(v), s = v < 0 ? '\u2212' : ''; if (a >= 1e9) return s + '€' + (Math.round(a / 1e8) / 10) + 'B'; if (a >= 1e6) return s + '€' + (Math.round(a / 1e5) / 10) + 'M'; if (a >= 1e4) return s + '€' + (Math.round(a / 100) / 10) + 'k'; return s + '€' + Math.round(a).toLocaleString('en'); })(val)
},
yaxis: {
labels: {
formatter: (val) => ((v) => { if (v == null || isNaN(v)) return '–'; const a = Math.abs(v), s = v < 0 ? '\u2212' : ''; if (a >= 1e9) return s + '€' + (Math.round(a / 1e8) / 10) + 'B'; if (a >= 1e6) return s + '€' + (Math.round(a / 1e5) / 10) + 'M'; if (a >= 1e4) return s + '€' + (Math.round(a / 100) / 10) + 'k'; return s + '€' + Math.round(a).toLocaleString('en'); })(val)
}
},
title: {
text: "Monthly result 2026 (€)"
},
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 waterfall-waterfall-crowded-currency-labels.json --out waterfall-waterfall-crowded-currency-labels.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/waterfall/waterfall-crowded-currency-labels/index.md …