# Crowded currency labels (Waterfall example)

> WestCoast Charts 1.1.5, release, public Core release, on npm. HTML: https://westcoast-charts.com/gallery/waterfall/waterfall-crowded-currency-labels/ · Index for agents: https://westcoast-charts.com/llms.txt

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

- Chart type: `waterfall` (Waterfall)
- Collection: Waterfall · Waterfall
- Raw configuration: https://westcoast-charts.com/gallery-src/waterfall/waterfall-crowded-currency-labels.js
- Standalone example: https://westcoast-charts.com/embed/samples/wcc/gallery/waterfall/waterfall-crowded-currency-labels.html

## Setup

```js
import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'

WestCoastCharts.use(types)
```

## Options

```js
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()
```

## Verify

- Text check (Library 1.1.5): load `west-coast-charts/agent/describe` and call `chart.describe({ format: "json" })` for the actual drawn state. The live reader is on this example’s HTML page.
- Command line (Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm, https://westcoast-charts.com/docs/cli/index.md): `wcc chart export waterfall-waterfall-crowded-currency-labels.json --out waterfall-waterfall-crowded-currency-labels.svg --with-table` (save the options above as JSON first)
