LineChart

A line chart for visualising trends over time, supporting multiple series.

Installation

npx dafink-ui add line-chart

Requires: recharts

Demo

Props

NameTypeDefaultDescription
dataChartDataPoint[]-Array of data objects.
xKeystring-Key in each data object to use as the x-axis label.
seriesChartSeries[]-Lines to render. Each entry has key, label, and optional color.
heightnumber240Chart height in px.
showLegendbooleantrueWhether to show the legend.
showGridbooleantrueWhether to show the background grid.
classNamestring""Extra classes applied to the container.