PlotSeries
Import from @pibbl/core/viz. Supply data, numeric x/y accessors, xScale,
yScale, and render(datum,index,data). The callback returns Pibbl nodes around
local (0,0) at the mapped point. Invalid coordinates and defined=false skip
rows. Custom elements keep ordinary styles, targets, and event handlers.
Use keyBy="id" or a key accessor for identity across reorder. Without keyBy,
original source indices are keys. Removing or invalidating a row unmounts it;
returning null retains the row wrapper. Keys normalize as Pibbl string/number keys.
The render callback constructs nodes; hooks belong in returned components.
Its explicit signal reads belong to the row receiver. Series handler props are
structural propagation listeners, with no independent hit geometry. Apply
pointerEvents, cursor, and styles to returned elements.
Marks inherit the plot allocation and are translated without resizing or centering. Percentage lengths retain that allocation until an inner container changes it. Each row costs its normal component subtree; use PointSeries for large dot batches, optionally overlaid with a few custom PlotSeries annotations.
API details from source
Section titled “API details from source”
PlotSeries
Section titled “PlotSeries”Places keyed custom Pibbl subtrees at local data coordinates.
PlotSeries: <D>({ data: input, x: xInput, y: yInput, xScale: xId, yScale: yId, defined, keyBy, render, ...events }: PlotSeriesProps<D>) => PibblNodeRelated API: PlotSeries, PlotSeriesProps, PibblNode.
Parameters
Section titled “Parameters”props— Data, coordinate accessors, scales, keys, and per-datum renderer. See PlotSeriesProps .
Returns
Section titled “Returns”Pibbl nodes placing each rendered datum at its mapped coordinates. See PibblNode.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/plot-series.tsx:29
PlotSeriesProps
Section titled “PlotSeriesProps”Authored inputs for PlotSeries, including the declared data and presentation options.
interface PlotSeriesProps<D> extends PibblEventHandlersRelated API: PlotSeriesProps, PibblEventHandlers.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/plot-types.ts:31
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/plot-types.ts:35
x
readonly x: PointAccessor<D>Related API: PointAccessor.
Property key or callback extracting the horizontal domain coordinate. See PointAccessor.
View source — packages/core/src/features/viz/lib/plot-types.ts:37
y
readonly y: PointAccessor<D>Related API: PointAccessor.
Property key or callback extracting the vertical domain coordinate. See PointAccessor.
View source — packages/core/src/features/viz/lib/plot-types.ts:39
xScale
readonly xScale: ScaleIdRelated API: ScaleId.
The scale used to map horizontal data coordinates. See ScaleId.
View source — packages/core/src/features/viz/lib/plot-types.ts:41
yScale
readonly yScale: ScaleIdRelated API: ScaleId.
The scale used to map vertical data coordinates. See ScaleId.
View source — packages/core/src/features/viz/lib/plot-types.ts:43
defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefinedReturns whether a datum contributes drawable or queryable coordinates. See PlotSeriesProps.
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/plot-types.ts:52
keyBy (optional)
readonly keyBy?: PlotKeyAccessor<D> | undefinedRelated API: PlotKeyAccessor.
Property or callback supplying stable identity for each datum. See PlotKeyAccessor.
View source — packages/core/src/features/viz/lib/plot-types.ts:54
render
readonly render: (datum: D, index: number, data: readonly D[]) => PibblNodeRelated API: PibblNode.
Renders the current data or resources using the supplied context. See PibblNode.
Parameters
Section titled “Parameters”-
datum— Datum to render. -
index— Zero-based index in the source data. -
data— Complete source data array.
Returns
Section titled “Returns”Pibbl content to place at the datum’s mapped coordinates. See PibblNode.
View source — packages/core/src/features/viz/lib/plot-types.ts:62
PlotKeyAccessor
Section titled “PlotKeyAccessor”A property or callback that provides stable identity for a plotted datum.
type PlotKeyAccessor<D> = | { [K in keyof D]-?: D[K] extends string | number ? K : never }[keyof D] | ((datum: D, index: number, data: readonly D[]) => string | number)Related API: PlotKeyAccessor.
Parameters
Section titled “Parameters”-
datum— Datum requiring an identity. -
index— Zero-based index in the source data. -
data— Complete source data array.
Returns
Section titled “Returns”A stable string or numeric key for the datum.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/plot-types.ts:17
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”- Point and custom plot series: Render styled point marks and custom keyed point content. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 380919b. ALPHA — NOT FOR PRODUCTION USE.