Overview
Active Users
Last 7 days
Installation
Usage
Variants
Simple Line
Area Fill
Multiple Lines
With Reference Line
API Reference
Array of data objects. Each object represents one point on the x-axis.
The key used as the x-axis category (e.g.
"date", "month").Array of line configurations:
{ key, label, color, fill?, strokeDasharray? }.Chart height in pixels.
Horizontal reference lines:
{ y, label, color, strokeDasharray? }.Show dots at data points.
Show background grid lines.
Show color legend.
Show interactive hover tooltips.
Line curve interpolation. Values:
linear · monotone · stepAccessibility
- SVG chart includes
<title>and<desc>elements for screen readers - Provide a data table fallback for critical data — charts are visual only
- Tooltip values are announced via
aria-live="polite"region - Use distinct colors AND line styles (solid, dashed, dotted) for multi-line charts
Do’s & Don’ts
Do
- Use Line Chart for time-series and trend data (daily, weekly, monthly)
- Use
fill: true(area fill) for single-metric dashboards — it’s easier to read - Add reference lines for targets or thresholds
- Limit to 4–5 lines maximum before using small multiples
Don't
- Don’t use Line Chart for categorical comparisons — use Bar Chart
- Don’t connect dots when data has gaps — use
connectNulls={false} - Don’t plot more than 5 lines on one chart — it becomes unreadable
- Don’t omit axis labels — always show the unit (USD, %, users)