Charts
Metric Trend
Composes a metric card: label, value, change chip, and an optional chart. Without a chart it is a stat card.
idle
Usage
Examples
Daily sign-ins
Stat cards
Without a chart, MetricTrend is a stat card with an icon, value, and change chip.
Recommendations
| Guidance | Practice |
|---|---|
| Do | State the reporting period and the comparison baseline. Keep the current value readable without interpreting the plot. |
| Do | Put the legend in actions and pass legend={false} to the chart. Set good="down" on MetricDelta for metrics where a fall is good, such as refunds. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | The application supplies the trend visualization and calculations. Color alone must not indicate improvement. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | Required / Optional | Provides the metric heading and headline value. Omit the value when the chart is the headline. |
| | Optional | Places a change chip, usually MetricDelta, beside the value. |
| | Optional | Adds supporting context below the value. |
| | Optional | Shows a glyph in a 24px brand tile before the label. |
| | Optional | Places a legend, menu, or range control at the top inline end. |
| | Optional | Composes a caller-owned chart below the header; omit it for a stat card. |
| | None | Sets a currency sign or unit beside the value, smaller and muted, so the numeral leads: "$" or "h". |
| | "value" | footer moves the description and change chip into an inset strip at the bottom of the card. |