caliper uidocs

Revenue explorer

Pro

Revenue split by segment and period, with a table.

Installs components/ui/revenue-explorer.tsxDepends on d3-shapeMotion none in component source
pnpm dlx shadcn@latest add @caliper/revenue-explorer
Monthly revenue$2.19M +28.9% vs last year

Monthly revenue
PeriodSubscriptionsUsageServicesLast year
Jan900002400018000105600
Feb967002833823200117997
Mar1034003232428400129986
Apr1056003569220600127571
May1123003832825800138320
Jun1190004029518000138290
Jul1212004182323200144509
Aug1279004324828400154051
Sep1346004493020600153700
Oct1368004716725800160262
Nov1435005012318000160833
Dec1502005378323200171750

When to use #

Use it for

  • Finance asks where the money comes from.

Skip it when

  • You need a single total.

Installation #

terminal
pnpm dlx shadcn@latest add @caliper/revenue-explorer

Adds its 4 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage #

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { RevenueExplorer } from "@/components/ui/revenue-explorer"

The worked example comes with Pro

The 18-line example behind the preview opens here with a Pro or Team licence.

Checking your licence…

API reference #

RevenueExplorer

component
PropTypeDefaultDescription
label *string—
segments *readonly { id: string; label: string; }[]—
data *readonly RevenuePoint[]—
priorreadonly number[]—The same periods a year earlier, as totals.
loadingboolean—
errorstring—
classNamestring—

Accessibility #

It exposes img and status semantics, with aria-label, aria-busy and aria-hidden kept in step with state. Changes that matter are announced through a live region.

No custom key handling; Tab and the native activation keys do the work.

Motion #

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.