Skip to main content

<Baseline>

component@pond-ts/chartssource

A horizontal line at a y value, scaled against one row axis (RTC's Baseline). Its label anchors at the left, at the line's height.

Props

valuenumberrequired

y value in the linked axis's units.

axisstring

Which <YAxis> (by id) to measure against; omit for the row's default axis.

editingboolean

When true, this mark is in single-annotation edit (the double-click target): handles stay out, it's draggable, and it reads as level 1 — while other marks stay static. Independent of the container's global editAnnotations. Pair with onEditAnnotation (the consumer holds an editingId and sets editing={editingId === id}).

hoveredboolean

Controlled hover (OR'd with pointer hover) — lets a legend row light the mark remotely. Pair with the container's onHoverAnnotation to sync both ways.

idstring

Stable consumer id — a click reports it via onSelectAnnotation.

indicatorboolean

Also pin this baseline's value to its y-axis as an on-axis pill (in the annotation colour) — the axis-edge counterpart of the near-line chip. Default false. The pill always shows the formatted value (the axis coordinate), never the custom label (which stays the near-line chip) — an indicator reads like a tick.

labelstring | false

Chip label. Omit to format value with that axis's formatter; pass false (or '') to render no label chip.

labelPosition'center' | 'above'

Where the label chip sits relative to the line: center (default) rides on the line, vertically centred; above sits just on top of it.

labelSide'left' | 'right'

Which side of the chart the near-line label chip sits. Default left.

onChange(value: number) => void

Make the baseline editable (in edit mode): dragging it vertically reports the new value (controlled — wire it back to value).

selectableboolean

Whether the baseline responds to hover + selection (default true). When false it's inert background context — drawn at the back (level 3) always.

selectedboolean

Controlled selection — brightens to the front (level 1). Handles are an edit-mode hover affordance, not a selection cue. Ignored if not selectable.