Components (172)
Metering Chart
Metering Chart — daily usage bars with rolling totals and interactive breakdown tags.
Loading Metering Chart…
Usage
import { MeteringChart } from "ui-kit/components/metering-chart";Props
| Prop | Type | Default | Description |
|---|---|---|---|
title* | string | — | — |
data* | MeteringDay[] | [] | One entry per day, oldest first |
totals | MeteringTotal[] | [] | Small figures under the title, e.g. Total volume and Total events – they roll when they change |
period | string | — | The span on the right, e.g. "Sep 1 – Sep 21" |
live | boolean | false | The last bar is today and still counting: indigo, with a sheen, and a turning spinner in the badge |
badge | string | — | Text of the badge next to the title – "Real-time" when live; leave empty for none |
format | (n: number) => string | plain | Formats values in the tag and the totals |
axisFormat | (n: number) => string | — | Formats the value axis – falls back to format |
colors | string[] | PALETTE | Colors the bars drift through from left to right – any CSS colors |
accent | string | — | Color of the live bar |
height | number | 168 | Height of the plot in px |
emptyText | string | "No usage yet" | Quiet text when there is nothing to draw |
breakdownLimit | number | 4 | How many parts of a breakdown the tag lists – the rest fold into one row |
otherLabel | string | "Other" | Label of the row the smaller parts fold into |
className | string | — | — |