LINE CHART
SVG line chart with multi-series support, animated draw-on effect, optional area fill, grid lines, and an automatic legend.
PREVIEW
INSTALLATION
USAGE
MULTI-SERIES
VARIANTS
variant="ACTIVE"
variant="WARNING"
variant="CRITICAL"
variant="DEFAULT"
OPTIONS
showDots=false showArea=true
showGrid=false showDots=true
PROPS
| PROP | TYPE | DEFAULT | DESCRIPTION |
|---|---|---|---|
| series | LineChartSeries[] | — | Array of data series. Each has id, label, data[], and optional variant. |
| labels | string[] | — | X-axis labels, same length as each series.data. |
| title | string | undefined | Optional header label. |
| height | number | 160 | Chart area height in px. |
| min | number | min(data) | Override y-axis minimum. |
| max | number | max(data) | Override y-axis maximum. |
| showDots | boolean | true | Show circles at data points. |
| showArea | boolean | false | Fill area under the line. |
| showGrid | boolean | true | Show horizontal grid lines. |
| showLegend | boolean | auto | Show legend. Defaults to true when series.length > 1. |
| animated | boolean | true | Animate the line drawing on mount. |
| className | string | — | Additional classes merged via cn(). |