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
ChartLegendwhen displaying more than one line - Cap at 5 lines per chart — more than that becomes unreadable