RemotionUI

Line Chart Draw

SVG line chart that draws itself on.

PrimitiveData & mediaAdvanced

line-chart-draw30fps · 960×540
Install
$ npx remotion-ui@latest add line-chart-draw

A line chart on a rounded value axis, drawn on by a single progress value: the stroke evolves along its own length, the gradient fill is wiped in behind it, and each dot lands as the tip passes. Curves are a clamped cardinal spline, so the line never overshoots past a value that is not in the data.

Set showAxis={false} and includeZero={false} for a sparkline.

Advanced. Installs @remotion/paths.

Agent notes

Install first, then import the copied source component locally. AI guide →

Import
@/remotion/primitives/line-chart-draw
  • Use when: data stories, metrics, charts, and numeric proof points.
  • Customize: points, width, height, color, plus copied source for timing, layout, colors, and typography.
  • Rule: do not import this component from the remotion-ui npm package; it is copied into your project.

Usage

Example
import { LineChartDraw } from "@/remotion/primitives/line-chart-draw"; <LineChartDraw points={[ { x: 0, y: 12000, label: "Jan" }, { x: 1, y: 24000, label: "Feb" }, ]} />

API Reference

PropTypeDescription
points*ChartPoint[]Chart points. `label` supplies the x-axis tick.
widthnumberDrawing width. Defaults to the composition width — pass the slot width inside padding.
heightnumberDrawing height. Defaults to 40% of the composition height.
colorstringLine, area and dot colour.
strokeWidthnumberLine weight. Scales with the chart width by default.
variant"smooth" | "linear"Clamped cardinal spline, or straight segments.
showAxisbooleanGridlines and value labels on rounded ticks.
showXLabelsbooleanCategory labels under the plot.
showAreabooleanGradient fill, wiped in with the draw.
showDotsbooleanDot deposited on each point as the line passes it.
showHeadbooleanGlowing dot riding the tip while the line draws.
showEndLabelbooleanValue callout on the final point.
includeZerobooleanAnchor the axis at zero. Turn off for sparklines.
valueFormatter(value: number) => stringFormats axis ticks and the end label.
durationInFramesnumberDraw-on duration.
delayInFramesnumberDelay before the draw starts.
framenumberFrame override — pass the parent frame inside a Sequence.

Related