Skip to Content
UI Kit
Components (172)

Metering Chart

Metering Chart — daily usage bars with rolling totals and interactive breakdown tags.

Open preview
Loading Metering Chart…

Usage

import { MeteringChart } from "ui-kit/components/metering-chart";

Props

PropTypeDefaultDescription
title*string——
data*MeteringDay[][]One entry per day, oldest first
totalsMeteringTotal[][]Small figures under the title, e.g. Total volume and Total events – they roll when they change
periodstring—The span on the right, e.g. "Sep 1 – Sep 21"
livebooleanfalseThe last bar is today and still counting: indigo, with a sheen, and a turning spinner in the badge
badgestring—Text of the badge next to the title – "Real-time" when live; leave empty for none
format(n: number) => stringplainFormats values in the tag and the totals
axisFormat(n: number) => string—Formats the value axis – falls back to format
colorsstring[]PALETTEColors the bars drift through from left to right – any CSS colors
accentstring—Color of the live bar
heightnumber168Height of the plot in px
emptyTextstring"No usage yet"Quiet text when there is nothing to draw
breakdownLimitnumber4How many parts of a breakdown the tag lists – the rest fold into one row
otherLabelstring"Other"Label of the row the smaller parts fold into
classNamestring——

On this page