Skip to main content

LineChart

LineChart — Prism component.

Signature
Density
Viewport
Theme follows the navbar ☀/☾ toggle
Live demo
Open ↗

When 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

PropTypeRequiredDescription
seriesLineSeries[]Yes
labelsstring[]
heightnumber
showGridboolean
showLegendboolean
showDotsboolean
yTicksnumber
formatY(v: number) =&gt; React.ReactNode
captionstring