Skip to main content

<LineChart>

component@pond-ts/chartssource

A line draw layer. Reads column from series into a ChartSeries (columnar, gaps as NaN), registers itself into the enclosing Layers (scaling against its axis), and renders nothing to the DOM — the row draws it. The line breaks at gaps rather than spanning them.

Props

columnstringrequired

Name of the numeric value column to plot.

seriesTimeSeriesTimeSeriesclasspond-ts

An immutable, schema-typed, ordered collection of events — the batch layer's core primitive. A series is constructed whole from complete data and never mutated: every transform (filter, align, rollup, …) returns a new TimeSeries, so the full analytical surface can sort, scan, or index freely. Example: new TimeSeries({ name, schema, rows }).

<S> | ValueSeriesValueSeriesclasspond-ts

A value-keyed series — the closed value-axis counterpart of TimeSeries. Its key is a monotonic non-time axis (distance, cumulative work, …). Two doors in: project a TimeSeries onto one of its monotonic columns (TimeSeries.byValue(axis) — a track re-keyed by cumulative distance), or construct directly from columnar arrays (`ValueSeries.fromC…

<VS>
required

The source series. A TimeSeries plots against the time axis; a ValueSeries (series.byValue('cumDist')) against its value axis — the container infers which from the data, no axis-type prop. Either way the key / axis column supplies x and column supplies y.

Live charts: series.byValue(…) mints a fresh projection each call, so passing series={s.byValue('dist')} inline re-registers this layer every render — on a frequently re-rendering (e.g. scrub-driven) chart, memoize the projection (useMemo) so the layer isn't rebuilt each frame.

asstring

The series' semantic identifier — what the data is / how it should read (e.g. heartrate, power, or a role name like foam). The theme maps it to a LineStyle (theme.line[as] ?? theme.line.default). Omitted ⇒ the default stylecolumn is the data, as is the identity, and there's no per-component colour/width override (that second styling channel is what bred react-timeseries-charts' styling bugs; restyle via the theme).

axisstring

Which <YAxis> (by its id) this line scales against — picks the scale, where as picks the style (separate concerns). Omitted ⇒ the row's default axis (the first declared, or the implicit auto-domain axis).

curveCurveCurvetype@pond-ts/charts'linear' | 'monotone' | 'natural' | 'basis' | 'step'

Render-time path interpolation for a line / band — how the path is drawn between points, a pure view concern (it does not change the data; denoising is pond's smooth(), upstream). Sparse aggregated bands look angular as a polyline; a curve smooths the path (RTC's interpolation).

Render-time path interpolation between points — a view concern (denoise the data with pond's smooth() upstream). Omitted ⇒ 'linear' (straight segments). 'monotone' is a smooth line that still passes through points.

gapsGapModeGapModetype@pond-ts/charts'none' | 'empty' | 'dashed' | 'step' | 'fade'

How a gap-aware draw layer (LineChart / AreaChart) renders a gap — a run of non-finite (NaN) samples, the signal a coast / dropout / missing bucket leaves in the columnar data (Number.isFinite, never != null; see docs/rfcs/charts.md trap #2). One concept shared across a line and its area fill, so both speak the same vocabulary.

How a gap (a coast / dropout — a run of NaN in column) is rendered (a GapMode). Omitted ⇒ 'empty': the line breaks at the gap and leaves a hole (the honest default). 'none' bridges straight across; 'dashed' adds a faint dashed bridge over the break; 'step' adds a faint flat dashed line at the average of the two edge values; 'fade' is estela's fade-to-baseline at each gap edge. Shared with <AreaChart> — one concept. (The 'dashed' / 'step' connector faintness is the theme's gap.connectorOpacity.)

Break the line at each trading-axis discontinuity (a session / day / lunch close→open) when the container renders on a trading-time axis (a discontinuities / calendar provider). Omitted ⇒ false: the line connects the last pre-close point straight to the next open across the collapsed gap (the near-vertical connector). true ends the line at the close and re-starts it at the open — the intraday look, where a session's price shouldn't visually flow into the next.

This is a scale break (driven by the axis's collapsed gaps), orthogonal to gaps (a data break, a NaN run) — set both independently. A no-op on a continuous axis (no provider) or a provider without boundaries.