Line Chart

Show change over a continuous dimension — time, index, or ordered categories.

Use line charts when the story is about trend and rate of change, not category totals. Bind a shared Dataset via x_field and y_fields, or pass inline series and axis definitions for demos.

  • Revenue, throughput, or KPI trends across months or quarters.
  • Multiple series on one axis when metrics share the same x dimension.
  • Threshold annotations via composition children such as ReferenceLine.
  • Bind a Dataset with x_field and y_fields, or pass inline series with aligned x_axis categories.
  • Set show_markers: true on series when points are sparse; use connect_nulls to bridge missing values.
  • Inferred x-axes use crate::DomainLimit::Strict by default — override via AxisDef.domain_limit.
  • Leave skip_animation unset to honor reduced-motion; path draw animation runs on enter/update otherwise.
  • Wrap the chart in a native element with data-testid for E2E hooks.
Two-series line chart

Compare two metrics that share the same time axis. Markers are off by default; set show_markers: true when sparse points need visible marks. Enable legend and tooltip (see cross-cutting previews) for exploration.

200k400k600kAmount (USD)Q1Q2Q3Q4Quarter
Connect nulls across gaps

Missing values (f64::NAN or null dataset cells) break the stroke by default. Set connect_nulls: true on the series to bridge gaps — useful for sparse telemetry feeds.

200k400k600kAmount (USD)Q1Q2Q3Q4Quarter
Reference line

Horizontal threshold via ReferenceLine composition child. Place the line after LinePlot so it renders above the stroke; use when targets or limits must stay visible on resize.

200k400k600kAmount (USD)Q1Q2Q3Q4Quarter