Dune Charts

Line chart

Multi-series trends without area fill.

Use line charts when you want trends without filled area. Lines use stroke styling from the theme and series config. They do not use fill or pixel.

LineSingle-series pixel polyline.

Examples

Multi-series

Add one <DuneLineChart.Line /> per dataKey.

Multi-series linePixel polylines for several series.

Loading

Set loading on the root to show a pixel skeleton until data is ready.

Loading…

Parts

PartRole
DuneLineChartRoot: data, config, loading, chartProps
DuneLineChart.GridCartesian grid
DuneLineChart.XAxisCategory / index axis
DuneLineChart.YAxisValue axis
DuneLineChart.TooltipHover tooltip
DuneLineChart.LegendSeries legend
DuneLineChart.LineOne series (dataKey, optional type, dot, strokeWidth)

Props

Root

PropTypeDefaultNotes
dataRecord<string, unknown>[]requiredRow objects
configRecord<string, DuneSeriesConfig>-Labels and colors
loadingbooleanfalsePixel skeleton
emptyMessagestring-Empty-state copy
chartPropsobject-Extra Recharts LineChart props
classNamestring-Wrapper class

Line

PropTypeNotes
dataKeystringSeries field
typeRecharts curve typeFor example monotone
dotboolean | objectPoint markers
strokeWidthnumberStroke thickness
namestringOverrides legend name
isAnimationActivebooleanSeries animation

Tips

  • Line charts skip pixel fills on purpose. Use area when you need dither or bands.
  • Set colors with config[key].color. See Chart config.
  • Use type="monotone" for smooth curves on irregular x spacing.

On this page