Crowded currency labels
Twelve monthly steps in euros plus a total.
Why it matters compact € labels from 100 000, collision pass hides or moves labels instead of overlapping; at 390 px labels thin out
Open the chart without page chrome ↗
// 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() 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 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. Save a JSON spec first and check the loaded runtime and supported modules before rendering. Command reference
Loading /gallery/waterfall/waterfall-crowded-currency-labels/index.md …