Weighted point series
WeightedPointSeries maps x and y observations and converts a supplied weight to
circle area. It does not calculate precision, sample size, effect estimates, or
any statistical summary.
import { WeightedPointSeries } from "@pibbl/core/viz";const assayObservations = [{ concentration: 1, inhibition: 49, precision: 64 }];<WeightedPointSeries data={assayObservations} x="concentration" y="inhibition" weight="precision" xScale="concentration" yScale="inhibition" weightDomain={[0, 100]} radiusRange={[0, 10]}/>;Required props are data, x, y, weight, xScale, yScale, and
weightDomain. Coordinate and weight accessors are field keys or synchronous
callbacks. Both coordinate scales follow PointSeries: each can be continuous
or categorical where supported by the selected scale.
weightDomain is [0, maximum], where maximum is finite and positive. The
zero baseline is required so a mark’s area is proportional to its supplied
weight. radiusRange is [0, maximumRadius] and defaults to [0, 6] local
units. The radius is maximumRadius * sqrt(weight / maximum). A zero or nullish
weight omits a mark; negative, nonfinite, and out-of-domain weights throw. The
component never clamps or infers a weight.
style is shared across marks and supports whole-object and shallow signals.
Its fields are fill (default #087f8c), stroke, strokeWidth (default 1),
opacity (default 1), and cursor. Radius is intentionally derived only from
weight. defined omits a record before other accessors run. Missing coordinates
omit that record under the ordinary series contract.
Marks retain source paint order and are batched into one ordinary Pibbl pointer
target. Series event handlers receive ordinary bubbled events rather than an
inferred datum. Use pointerEvents="none" for decorative points. Signals update
on Pibbl’s scheduler; the component owns no retained resources or inference
state.
API details from source
Section titled “API details from source”
WeightedPointSeries
Section titled “WeightedPointSeries”Draws batched circles whose visible area is proportional to supplied weights.
Nullish weights and zero weights omit their marks. Finite positive weights must
fall inside weightDomain; the component never clamps or infers weights.
data and shared style signals schedule ordinary Pibbl updates. The component
owns no retained resources and returns one ordinary Pibbl pointer target.
WeightedPointSeries: <D>({ data: input, x: xInput, y: yInput, weight: weightInput, xScale: xId, yScale: yId, weightDomain, radiusRange, defined, style: styleInput, ...events }: WeightedPointSeriesProps<D>) => JSX.ElementRelated API: WeightedPointSeries, WeightedPointSeriesProps, JSX.
Parameters
Section titled “Parameters”props— Supplied observations, coordinate and weight accessors, scales, and paint. See WeightedPointSeriesProps.
Returns
Section titled “Returns”One batched Pibbl Path whose mark area is proportional to each supplied weight.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:175
WeightedPointSeriesProps
Section titled “WeightedPointSeriesProps”Authored inputs for WeightedPointSeries.
Weights are supplied data, not calculated precision, sample size, or evidence. The zero baseline and squared-radius interpolation make displayed area linear in the supplied weight.
interface WeightedPointSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptionsRelated API: WeightedPointSeriesProps, PibblEventHandlers, PibblEventParticipationOptions.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:52
Properties and methods
Section titled “Properties and methods”
data
readonly data: SignalValue<readonly D[]>Related API: SignalValue.
Readonly data or a signal containing it.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:55
x
readonly x: SeriesAccessor<D>Related API: SeriesAccessor.
Horizontal coordinate property or synchronous accessor.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:57
y
readonly y: SeriesAccessor<D>Related API: SeriesAccessor.
Vertical coordinate property or synchronous accessor.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:59
weight
readonly weight: WeightAccessor<D>Related API: WeightAccessor.
Nonnegative supplied weight property or synchronous accessor.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:61
xScale
readonly xScale: ScaleIdRelated API: ScaleId.
Scale used to map x coordinates.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:63
yScale
readonly yScale: ScaleIdRelated API: ScaleId.
Scale used to map y coordinates.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:65
weightDomain
readonly weightDomain: readonly [0, number]Supplied inclusive weight extent. The lower bound must be zero.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:67
radiusRange (optional)
readonly radiusRange?: readonly [0, number] | undefinedRadius extent [0, maximumRadius]; defaults to [0, 6].
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:69
defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefinedExcludes a datum before coordinate and weight 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 datum contributes a mark.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:77
style (optional)
readonly style?: SignalValue<Readonly<{ readonly fill?: SignalValue<FillStyle | undefined>; readonly stroke?: SignalValue<StrokeStyle | undefined>; readonly strokeWidth?: SignalValue<number | undefined>; readonly opacity?: SignalValue<number | undefined>; readonly cursor?: SignalValue<string | undefined>; }>> | undefinedRelated API: SignalValue, FillStyle, StrokeStyle, opacity.
Shared presentation. Whole-object and shallow field signals are supported.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:79
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
WeightedPointSeriesStyle
Section titled “WeightedPointSeriesStyle”Shared presentation for WeightedPointSeries.
interface WeightedPointSeriesStyleRelated API: WeightedPointSeriesStyle.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:32
Properties and methods
Section titled “Properties and methods”
fill (optional)
readonly fill?: FillStyle | undefinedRelated API: FillStyle.
Paint used for point interiors. Defaults to #087f8c.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:34
stroke (optional)
readonly stroke?: StrokeStyle | undefinedRelated API: StrokeStyle.
Paint used for point outlines. Defaults to no outline.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:36
strokeWidth (optional)
readonly strokeWidth?: number | undefinedOutline width in local coordinate units. Defaults to 1.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:38
opacity (optional)
readonly opacity?: number | undefinedRelated API: opacity.
Opacity in the inclusive range [0, 1]. Defaults to 1.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:40
cursor (optional)
readonly cursor?: string | undefinedPointer cursor while the series owns a target.
View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:42
WeightAccessor
Section titled “WeightAccessor”A data property or callback extracting a nonnegative research weight.
type WeightAccessor<D> = LineAccessor<D>Related API: WeightAccessor, LineAccessor.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/weighted-point-series.tsx:29
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”- Supplied weights mapped to marker area: Supplied weights mapped to marker area. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision dd39ce2. ALPHA — NOT FOR PRODUCTION USE.