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
currently supports only "linear" (the default).
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, fill, or area is implemented.
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.
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:22
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:378
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:392
LineCurve
Section titled “LineCurve”The supported interpolation mode for a line series.
type LineCurve = "linear"Related API: LineCurve.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/types.ts:400
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:407
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:409
strokeWidth (optional)
readonly strokeWidth?: number | undefinedWidth of the painted outline. See LineSeriesStyle.
View source — packages/core/src/features/viz/lib/types.ts:411
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:413
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:415
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:420
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:434
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:439
x
readonly x: LineAccessor<D>Related API: LineAccessor.
Property key or callback extracting the horizontal domain coordinate. See LineAccessor.
View source — packages/core/src/features/viz/lib/types.ts:441
y
readonly y: LineAccessor<D>Related API: LineAccessor.
Property key or callback extracting the vertical domain coordinate. See LineAccessor.
View source — packages/core/src/features/viz/lib/types.ts:443
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:445
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:447
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:456
curve (optional)
readonly curve?: "linear" | undefinedInterpolation mode used to connect successive defined samples. See LineCurve.
View source — packages/core/src/features/viz/lib/types.ts:458
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:463
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
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 380919b. ALPHA — NOT FOR PRODUCTION USE.