LineSeries
Import LineSeries and its types from @pibbl/core/viz. LineSeriesProps<D> requires
data, x, y, xScale, and yScale. Data is a readonly array or a core signal
of an array. It is not a thunk. Replace arrays to notify consumers; mutation alone
is not reactive.
LineAccessor<D> accepts a property key whose value is a LineCoordinate, or
(datum, index, data) => LineCoordinate. A coordinate is a number, null, or
undefined. Function accessors run during component evaluation; signal reads inside
them belong to the series. Row fields are not recursively unwrapped.
defined(datum, index, data) runs before coordinate accessors. False, missing,
NaN, or infinite coordinates split the line into separate runs. Isolated points
paint nothing. Input order is preserved; points are never sorted. LineCurve
supports "linear" (the default) or a named immutable
step or monotone definition.
LineSeriesStyle is one static style across every run, with signal-valued whole
style/direct fields: stroke (default #2563eb), strokeWidth (2), opacity (1),
cursor, and lineInteractionWidth (defaults to strokeWidth). Widths must be
finite and nonnegative; opacity is between 0 and 1. No per-datum style callback,
segment styling or fill is implemented here; compose AreaSeries for filled geometry.
One core Path owns the complete batch’s paint and stroke hit geometry. Ordinary
core event handlers and pointerEvents work on that target; gaps remain gaps for
hit testing. There is no nearest-point event enrichment. Applications can compose
inspection or brushing with useLinearScale and core targets.
Wrap the series in a core Clip for clipping; scales do not clip automatically.
Categorical positions
Section titled “Categorical positions”LineSeries, PointSeries, and PlotSeries accept SeriesAccessor<D> for x/y. It
extracts SeriesCoordinate = number | string | null | undefined. PointScale maps
string and finite numeric categories without coercion: 1 and "1" remain
different identities. Unknown categories throw RangeError. Continuous scales
require numbers and reject strings. Null, undefined, and nonfinite numbers create
gaps (or omit isolated marks). BarScale is not a point-position scale.
Source order determines line traversal and is never sorted. PointScale reversal
changes placement without changing datum identity. Domain/data signals and nested
scale lookup retain ordinary reactive ownership. Application code supplies
category inspection through the dedicated usePointScale mapping/inversion;
numeric query helpers and PointAccessor remain numeric contracts.
LineAccessor remains the numeric accessor for area/band bounds and numeric
operations. Neither accessor type can statically prove that an arbitrary scale ID
refers to the matching provider; runtime validation enforces that relationship.
API details from source
Section titled “API details from source”
LineSeries
Section titled “LineSeries”Draws a scaled line through defined data values, leaving gaps for undefined values.
LineSeries: <D>({ data: dataInput, x: xInput, y: yInput, xScale: xId, yScale: yId, defined, curve, style: styleInput, ...eventProps }: LineSeriesProps<D>) => JSX.ElementRelated API: LineSeries, LineSeriesProps, JSX.
Parameters
Section titled “Parameters”props— Data, coordinate accessors, scales, and line styling. See LineSeriesProps.
Returns
Section titled “Returns”Pibbl nodes drawing the data as a line series.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/line-series.tsx:24
LineCoordinate
Section titled “LineCoordinate”A numeric series coordinate, or a missing value that can create a gap.
type LineCoordinate = number | null | undefinedRelated API: LineCoordinate.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/types.ts:387
LineAccessor
Section titled “LineAccessor”A data property or callback that extracts a numeric series coordinate.
type LineAccessor<D> = | { [K in keyof D]-?: D[K] extends LineCoordinate ? K : never }[keyof D] | ((datum: D, index: number, data: readonly D[]) => LineCoordinate)Related API: LineAccessor, LineCoordinate.
Parameters
Section titled “Parameters”-
datum— Datum whose coordinate is being read. -
index— Zero-based index in the source data. -
data— Complete source data array.
Returns
Section titled “Returns”The datum’s coordinate, including the supported missing-value sentinel. See LineCoordinate .
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/types.ts:401
SeriesAccessor
Section titled “SeriesAccessor”Extracts one position for a line, point, or custom mark.
type SeriesAccessor<D> = | { [K in keyof D]-?: D[K] extends SeriesCoordinate ? K : never }[keyof D] | ((datum: D, index: number, data: readonly D[]) => SeriesCoordinate)Related API: SeriesAccessor, SeriesCoordinate.
Parameters
Section titled “Parameters”-
datum— Original record. -
index— Original record index. -
data— Complete source records.
Returns
Section titled “Returns”A numeric or categorical position. See SeriesCoordinate.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/types.ts:414
SeriesCoordinate
Section titled “SeriesCoordinate”A numeric or categorical position, or a missing value.
type SeriesCoordinate = number | string | null | undefinedRelated API: SeriesCoordinate.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/types.ts:405
LineCurve
Section titled “LineCurve”The supported interpolation mode for a line series.
type LineCurve = "linear" | SeriesCurveRelated API: LineCurve, SeriesCurve.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/types.ts:422
LineSeriesStyle
Section titled “LineSeriesStyle”Supported geometry and presentation properties for LineSeries.
interface LineSeriesStyleRelated API: LineSeriesStyle.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/types.ts:429
Properties and methods
Section titled “Properties and methods”
stroke (optional)
readonly stroke?: StrokeStyle | undefinedRelated API: StrokeStyle.
Paint used for the outline. See StrokeStyle.
View source — packages/core/src/features/viz/lib/types.ts:431
strokeWidth (optional)
readonly strokeWidth?: number | undefinedWidth of the painted outline. See LineSeriesStyle.
View source — packages/core/src/features/viz/lib/types.ts:433
opacity (optional)
readonly opacity?: number | undefinedRelated API: opacity.
Opacity of the painted result. See LineSeriesStyle.
View source — packages/core/src/features/viz/lib/types.ts:435
cursor (optional)
readonly cursor?: string | undefinedCursor shown while this target owns pointer presentation. See LineSeriesStyle.
View source — packages/core/src/features/viz/lib/types.ts:437
lineInteractionWidth (optional)
readonly lineInteractionWidth?: number | undefinedWidth used for line hit testing independently of the visible stroke width. See LineSeriesStyle.
View source — packages/core/src/features/viz/lib/types.ts:442
LineSeriesProps
Section titled “LineSeriesProps”Authored inputs for LineSeries, including the declared data and presentation options.
interface LineSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptionsRelated API: LineSeriesProps, PibblEventHandlers, PibblEventParticipationOptions.
See also
Section titled “See also”PibblEventParticipationOptions
SignalStyle
View source — packages/core/src/features/viz/lib/types.ts:456
Properties and methods
Section titled “Properties and methods”
data
readonly data: SignalValue<readonly D[]>Related API: SignalValue.
Application data supplied to the component or reported by the event. See SignalValue.
View source — packages/core/src/features/viz/lib/types.ts:461
x
readonly x: SeriesAccessor<D>Related API: SeriesAccessor.
Property key or callback extracting the horizontal domain coordinate. See LineAccessor.
View source — packages/core/src/features/viz/lib/types.ts:463
y
readonly y: SeriesAccessor<D>Related API: SeriesAccessor.
Property key or callback extracting the vertical domain coordinate. See LineAccessor.
View source — packages/core/src/features/viz/lib/types.ts:465
xScale
readonly xScale: ScaleIdRelated API: ScaleId.
The scale used to map horizontal data coordinates. See ScaleId.
View source — packages/core/src/features/viz/lib/types.ts:467
yScale
readonly yScale: ScaleIdRelated API: ScaleId.
The scale used to map vertical data coordinates. See ScaleId.
View source — packages/core/src/features/viz/lib/types.ts:469
defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefinedReturns whether a datum contributes drawable or queryable coordinates. See LineSeriesProps.
Parameters
Section titled “Parameters”-
datum— Datum to test. -
index— Zero-based index in the source data. -
data— Complete source data array.
Returns
Section titled “Returns”Whether this datum should participate in the series or query.
View source — packages/core/src/features/viz/lib/types.ts:478
curve (optional)
readonly curve?: LineCurve | undefinedRelated API: LineCurve.
Interpolation mode used to connect successive defined samples. See LineCurve.
View source — packages/core/src/features/viz/lib/types.ts:480
style (optional)
readonly style?: SignalValue<Readonly<{ readonly stroke?: SignalValue<StrokeStyle | undefined>; readonly strokeWidth?: SignalValue<number | undefined>; readonly opacity?: SignalValue<number | undefined>; readonly cursor?: SignalValue<string | undefined>; readonly lineInteractionWidth?: SignalValue<number | undefined>; }>> | undefinedRelated API: SignalValue, StrokeStyle, opacity.
Declared presentation and layout properties. See SignalValue, SignalStyle, LineSeriesStyle.
View source — packages/core/src/features/viz/lib/types.ts:485
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Data visualization companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Line series: Plot readings with a nullable gap and a scale-adjusted marker. Plain source
- Categorical series: Map original category identities with line and point marks. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 2dccb19. ALPHA — NOT FOR PRODUCTION USE.