Paired series
PairedSeries connects two supplied outcomes in each wide record. Both
endpoints must be observed; an incomplete pair contributes no segment. It does
not match subjects across tables, calculate change, or replace missing outcomes.
Compose PointSeries for endpoint circles, including unpaired observations.
import { PairedSeries } from "@pibbl/core/viz";const participants = [ { id: "P01", baseline: 62, week12: 44 }, { id: "P02", baseline: 58, week12: null },];<PairedSeries data={participants} before="baseline" after="week12" beforeX="Baseline" afterX="Week 12" xScale="endpoint" yScale="score" style={{ stroke: "#087f8c" }}/>;Required props are data, before, after, beforeX, afterX, xScale,
and yScale. Outcome accessors are numeric field keys or synchronous callbacks.
Endpoint x coordinates are explicit numeric or PointScale category positions.
Missing or nonfinite outcomes omit the entire pair. Unknown PointScale endpoint categories throw under the standard series coordinate contract; continuous x coordinates must be numeric. defined excludes a record
before outcome accessors run. Lines retain source encounter order.
Shared style supports stroke (default #2563eb), strokeWidth (default
2 local units), opacity (default 1), cursor, and lineInteractionWidth
(default stroke width). Whole-object and shallow field signals schedule updates.
Each component returns one batched ordinary Pibbl Path, with standard events and
pointerEvents. Events do not infer a participant or datum. Accessors are
synchronous and cannot call hooks or write signals. The component owns no
retained resources or statistical state.
API details from source
Section titled “API details from source”
PairedSeries
Section titled “PairedSeries”Draws a connector for each complete wide-record before/after pair.
The component does not manufacture point marks, calculate change, select a
baseline, or impute missing observations. Compose PointSeries for endpoints.
PairedSeries: <D>({ data: input, before: beforeInput, after: afterInput, beforeX, afterX, xScale: xId, yScale: yId, defined, style: styleInput, ...events }: PairedSeriesProps<D>) => JSX.ElementRelated API: PairedSeries, PairedSeriesProps, JSX.
Parameters
Section titled “Parameters”props— Wide records, endpoint accessors and coordinates, scales, and shared paint.
Returns
Section titled “Returns”One batched ordinary Pibbl path containing source-ordered pair connectors.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/paired-series.tsx:109
PairedSeriesProps
Section titled “PairedSeriesProps”Authored wide-record inputs for PairedSeries.
interface PairedSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptionsRelated API: PairedSeriesProps, PibblEventHandlers, PibblEventParticipationOptions.
View source — packages/core/src/features/viz/lib/paired-series.tsx:24
Properties and methods
Section titled “Properties and methods”
data
readonly data: SignalValue<readonly D[]>Related API: SignalValue.
Source records or a signal containing them.
View source — packages/core/src/features/viz/lib/paired-series.tsx:27
before
readonly before: LineAccessor<D>Related API: LineAccessor.
Numeric baseline or first-observation value.
View source — packages/core/src/features/viz/lib/paired-series.tsx:29
after
readonly after: LineAccessor<D>Related API: LineAccessor.
Numeric follow-up or second-observation value.
View source — packages/core/src/features/viz/lib/paired-series.tsx:31
beforeX
readonly beforeX: SeriesCoordinateRelated API: SeriesCoordinate.
Fixed x coordinate used for every before endpoint.
View source — packages/core/src/features/viz/lib/paired-series.tsx:33
afterX
readonly afterX: SeriesCoordinateRelated API: SeriesCoordinate.
Fixed x coordinate used for every after endpoint.
View source — packages/core/src/features/viz/lib/paired-series.tsx:35
xScale
readonly xScale: ScaleIdRelated API: ScaleId.
Scale mapping the two endpoint coordinates.
View source — packages/core/src/features/viz/lib/paired-series.tsx:37
yScale
readonly yScale: ScaleIdRelated API: ScaleId.
Numeric scale mapping both endpoint values.
View source — packages/core/src/features/viz/lib/paired-series.tsx:39
defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefinedExcludes a record before before/after accessors run.
Parameters
Section titled “Parameters”-
datum— Candidate source datum. -
index— Zero-based source index. -
data— Complete source data array.
Returns
Section titled “Returns”Whether this record contributes a connector.
View source — packages/core/src/features/viz/lib/paired-series.tsx:47
style (optional)
readonly style?: SignalValue<Readonly<{ readonly stroke?: SignalValue<StrokeStyle | undefined>; readonly strokeWidth?: SignalValue<number | undefined>; readonly lineInteractionWidth?: SignalValue<number | undefined>; readonly opacity?: SignalValue<number | undefined>; readonly cursor?: SignalValue<string | undefined>; }>> | undefinedRelated API: SignalValue, StrokeStyle, opacity.
Shared connector style, including whole-object and shallow field signals.
View source — packages/core/src/features/viz/lib/paired-series.tsx:49
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
PairedSeriesStyle
Section titled “PairedSeriesStyle”Shared connector appearance for PairedSeries.
type PairedSeriesStyle = TrajectorySeriesStyleRelated API: PairedSeriesStyle, TrajectorySeriesStyle.
View source — packages/core/src/features/viz/lib/paired-series.tsx:21
Properties and methods
Section titled “Properties and methods”
stroke (optional)
readonly stroke?: StrokeStyle | undefinedRelated API: StrokeStyle.
Path paint. Defaults to #2563eb.
View source — packages/core/src/features/viz/lib/trajectory-series.tsx:23
strokeWidth (optional)
readonly strokeWidth?: number | undefinedVisible path width in local units. Defaults to 2.
View source — packages/core/src/features/viz/lib/trajectory-series.tsx:25
lineInteractionWidth (optional)
readonly lineInteractionWidth?: number | undefinedPointer targeting width. Defaults to strokeWidth.
View source — packages/core/src/features/viz/lib/trajectory-series.tsx:27
opacity (optional)
readonly opacity?: number | undefinedRelated API: opacity.
Path opacity in [0, 1]. Defaults to 1.
View source — packages/core/src/features/viz/lib/trajectory-series.tsx:29
cursor (optional)
readonly cursor?: string | undefinedCursor while the batched path owns pointer presentation.
View source — packages/core/src/features/viz/lib/trajectory-series.tsx:31
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”- Complete paired endpoint connectors: Complete paired endpoint connectors. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision dd39ce2. ALPHA — NOT FOR PRODUCTION USE.