Chart

Line

Web supportediOS supportedAndroid supported

Compare continuous trends across an ordered category or time axis.

ECharts line series · View source

When to use

Use for trends. Do not smooth data when intermediate values are unknown.

Props

The chart's own props first, then the shared ones this form reads.

PropTypeDefaultDescription
categories*string[]Labels for the shared category axis.
series*ChartSeries[]Named data series aligned with the category axis.
formatChartNumberFormatNumber formatting shared by axes, labels and tooltips.
emphasisIdstringKeeps one series colored and mutes the others.
isSmoothbooleanfalseDraws rounded interpolation between observations.
seriesStylesRecord<string, ChartSeriesStyle>Per-series stroke, fill, dash and symbol, keyed by ChartSeries.id.
axisChartAxes{ x: true, y: true }Horizontal and vertical axis visibility.
animationChartAnimationMark entrance and data-update animation.
annotationsChartAnnotation[]Reference lines, highlighted ranges, points and text anchored to the plot.
interactionChartInteractionHover, crosshair, tooltip, selection, pan and zoom behaviour.
onInteraction(event: ChartInteractionEvent) => voidReceives normalized pointer and selection data. Needs a client component.
plotChartPlotStyleThe plot area alone — its own background, border, clipping and padding, inside the surface.
xAxisChartAxisOptionsScale, domain, ticks, grid and label for the horizontal axis — everything axis cannot say.
yAxisChartAxisOptionsThe same for the vertical axis.
texturebooleanfalseDraws decal patterns over fills — a second encoding on top of hue, for full colour-vision deficiency, print and forced-colors.
classNamestringCSS class applied to the chart root.
heightnumber240Plot height in px. A chart never measures its own content, so this is what reserves the space.
isLoadingbooleanfalseHeld true while the data is in flight. Shows the matching skeleton, then cross-fades into the plot.
skeletonReactNodeReplaces the built-in placeholder while isLoading is true. Takes a rendered element.
surfaceChartSurfaceThe container the plot sits in — background, border, corner radius, padding. Merges over Chart.Provider, key by key.