TrendChart
Lit line / area trend for the Industry theme.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
Lit line / area trend for the Industry theme.
Accessibility
Fully keyboard operable: Tab to focus, Enter/Space to activate. The visible focus ring uses --focus-ring — never remove it. Provide an accessible label (aria-label) for icon-only controls.
Install and import
npx shadcn@latest add @prism/trend-chart
import { TrendChart } from '@/components/prism/TrendChart';
In a no-build prototype, read it from the bundle instead: const { TrendChart } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
data | TrendDatum[] | — | |
variant | "area" | "line" | "spark" | — | "area" (default), "line", or "spark" for an axis-less inline trend. |
height | number | — | |
width | number | — | viewBox width; the SVG scales to its container. |
color | string | — | |
showGrid | boolean | — | |
showEnd | boolean | — | Lit LED at the latest point. |
formatTick | (v: number) => React.ReactNode | — | |
ticks | number | — | Number of horizontal gridlines / value ticks. |
caption | string | — |