Skip to main content

TrendChart

Lit line / area trend for the Industry theme.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When 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​

PropTypeRequiredDescription
dataTrendDatum[]—
variant"area" | "line" | "spark"—"area" (default), "line", or "spark" for an axis-less inline trend.
heightnumber—
widthnumber—viewBox width; the SVG scales to its container.
colorstring—
showGridboolean—
showEndboolean—Lit LED at the latest point.
formatTick(v: number) => React.ReactNode—
ticksnumber—Number of horizontal gridlines / value ticks.
captionstring—