Analytics layout

Understory
Toolbar, MetricsCard tiles, then chart and table in their own cards.

Usage

The app shell mounts it. Its pieces live in @/components/analytics.

When to use

Use it for

  • Every analytics page in one order: the toolbar (date range, resolution), a row of MetricsCard tiles, then the chart and the table, each in its own card.
  • SelectDate and ResolutionSelect drive the whole page, so the tiles and charts refresh together.
  • Charts draw from the chart tokens (--chart-1 and on) and carry a legend.

Avoid

  • A chart as the only way to read a number: pair it with tiles or a table.
  • Controls inside each chart that move it out of step with the rest of the page.

Accessibility

Checks

  • A legend or labels name every series, so nothing depends on color alone.

API

Read from each component's stories, the same source as COMPONENTS.md, and kept in step by check:design-system.

MetricsCard

Its stories don't declare argTypes, so no props are listed. The variants show its states.
VariantsDefaultPercentageEmptyWithChangeNegativeChangeNeutralChangeRefreshingLoadingErrorState

SelectDate

Its stories don't declare argTypes, so no props are listed. The variants show its states.
VariantsDefaultCustomRangeCustomPresetsAndUnitsDisabled

ResolutionSelect

Its stories don't declare argTypes, so no props are listed. The variants show its states.
Also exportsRESOLUTION_OPTIONS
VariantsDefaultUnresolved

Keep going

Color
Semantically named colors and a set of ramps for the full palette. Optimized for light and dark.
Patterns
How components come together into pages.