Skip to main content
Line charts display data as a series of points connected by line segments. They are best for showing continuous data and comparing multiple trends.

Basic line chart

Multi-line chart

Compare multiple data series:

Dashed lines

Use dashed lines for projected or estimated data:

Without dots

For dense data sets, hide dots for a cleaner look:

Styling guidelines

  • Use type="monotone" for smooth curves (weather data, trends)
  • Use type="linear" for straight-line connections (discrete measurements)
  • Set strokeWidth={2} as the default line weight
  • Use dot={{ r: 4 }} for visible data points (fewer than 20 points)
  • Use dot={false} for dense data (more than 20 points)
  • Set activeDot={{ r: 6 }} for the hover state dot
  • Use dashed lines for projections or secondary data
  • Use ChartLegend when displaying more than one line
  • Cap at 5 lines per chart — more than that becomes unreadable