LineChart
LineChart — Prism component.
Signature
Density
Viewport
Theme follows the navbar ☀/☾ toggleWhen to use
LineChart — Prism component.
Accessibility
Each chart ships an accessible fallback (a visually-hidden data table / aria-label summary) so the data is available to screen readers, not just sighted users. Colour is paired with shape/label, never used alone.
Import
const { LineChart } = window.PrismDesignSystem_39d121;
Examples
Area + target line
<LineChart labels={days}
series={[{ name: "Revenue", data: rev, area: true },
{ name: "Target", data: target, dashed: true }]}
formatY={(v) => "$" + v + "k"} />
Props
| Prop | Type | Required | Description |
|---|---|---|---|
series | LineSeries[] | Yes | |
labels | string[] | — | |
height | number | — | |
showGrid | boolean | — | |
showLegend | boolean | — | |
showDots | boolean | — | |
yTicks | number | — | |
formatY | (v: number) => React.ReactNode | — | |
caption | string | — |