# Value formats (/reference/value-formats)



A `format` is the optional display format applied to a numeric or date value. It is available
on every island and spec that renders a value: `metric.kpi`, every `metric.scorecard` stat,
`gauge.goal`, `table.grid` columns and details, `timeline.feed` highlight/stats/footer, and
every chart's `format` (and `xFormat` on the scatter). The set is identical everywhere, so a
format you learn on one island works the same on the next.

`format` is distinct from `unit`: `unit` appends a free-form suffix string (`bpm`, `kcal`),
while `format` controls how the number itself is rendered. Omitting `format` shows a plain
number with up to two decimals (the same as `decimal`).

For the field-by-field schema, see the [Manifest Reference](/reference/manifest.md); for where
each island accepts a `format`, see the [Islands overview](/islands/overview.md).

## Currency [#currency]

Whole units in the locale symbol, no decimals.

| Format           | Example         | Notes                                                                                                                   |
| ---------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `usd`            | `1234 → $1,234` | US dollar                                                                                                               |
| `eur`            | `1234 → €1,234` | Euro                                                                                                                    |
| `gbp`            | `1234 → £1,234` | Pound sterling                                                                                                          |
| `jpy`            | `1234 → ¥1,234` | Japanese yen                                                                                                            |
| `currency:<ISO>` | `currency:RSD`  | Any [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code — rendered in that currency's locale symbol and formatting. |

## Number [#number]

| Format    | Example            | Notes                                                             |
| --------- | ------------------ | ----------------------------------------------------------------- |
| `int`     | `1500.6 → 1,501`   | Thousands-separated integer (rounds).                             |
| `decimal` | `1234.5 → 1,234.5` | Thousands-separated, up to 2 decimals; same as omitting `format`. |
| `pct`     | `0.125 → 12.5%`    | Expects a 0–1 fraction; multiplies by 100.                        |
| `compact` | `1200 → 1.2K`      | Abbreviated large numbers (`3400000 → 3.4M`).                     |

<Callout type="warn">
  `pct` expects a 0–1 fraction and multiplies it by 100, so `0.125` renders as `12.5%`. Pass an
  already-multiplied percentage (`12.5`) and you get `1,250%`. Keep the raw ratio in your data.
</Callout>

## Unit [#unit]

| Format     | Example         | Notes                                                           |
| ---------- | --------------- | --------------------------------------------------------------- |
| `kg`       | `7.25 → 7.3 kg` | Kilograms, one decimal.                                         |
| `bytes`    | `1536 → 1.5 KB` | 1024-scale (B/KB/MB/GB/TB/PB); `1572864 → 1.5 MB`.              |
| `duration` | `90 → 1m 30s`   | Input is a number of seconds; `3900 → 1h 5m`, `273600 → 3d 4h`. |

<Callout type="info" title="Note">
  `duration` reads its input as a count of seconds, and `bytes` scales in powers of 1024 (not
  1000\). Convert to seconds or raw bytes in the data layer before binding.
</Callout>

## Date & time [#date--time]

Dates and times render without a timezone, so the value matches the data's wall clock and the
server and client always agree.

| Format     | Example                            | Notes                |
| ---------- | ---------------------------------- | -------------------- |
| `date`     | `2026-06-11 → Jun 11, 2026`        | Day, no time.        |
| `datetime` | `2026-06-11 21:30 → Jun 11, 21:30` | Day and time of day. |
| `time`     | `2026-06-11 21:30 → 21:30`         | Time of day only.    |
| `month`    | `2026-06-11 → Jun 2026`            | Month and year.      |

<Callout type="info" title="Tip">
  Date and time formats render with no timezone conversion: they show the wall-clock value in
  the data exactly as stored. That keeps SSR deterministic — the server and the browser never
  disagree on what a timestamp says.
</Callout>


---

*This is one page of the OpenIslands docs. Every page in one file: [/llms-full.txt](/llms-full.txt). Page index: [/llms.txt](/llms.txt). Links above point to `.md` siblings — append `.md` to any page URL for its raw markdown.*
