Censored point series
CensoredPointSeries draws supplied numerical observations as circles and
reporting limits as open directional markers. It is designed for assay and
laboratory datasets where a result may be reported as below an LLOQ or above a
ULOQ without inventing an exact measurement.
import { Absolute } from "@pibbl/core";import { CensoredPointSeries, LinearScale, LogScale } from "@pibbl/core/viz";
const samples = [ { hour: 0.25, concentration: 0.5, reporting: "below" as const }, { hour: 2, concentration: 12.8, reporting: "observed" as const }, { hour: 24, concentration: 50, reporting: "above" as const },];
<Absolute style={{ left: 64, top: 32, width: 600, height: 320 }}> <LinearScale id="time" domain={[0, 24]} range={[0, 600]}> <LogScale id="concentration" domain={[0.25, 100]} range={[320, 0]}> <CensoredPointSeries data={samples} x="hour" y="concentration" censoring="reporting" xScale="time" yScale="concentration" /> </LogScale> </LinearScale></Absolute>;Required inputs are data, x, y, censoring, xScale, and yScale.
x and y are numeric property keys or synchronous accessors. censoring
is a property key or callback returning one of "observed", "below", or
"above". Both scales are ancestor continuous scales: linear, UTC, log, or
symlog.
For below and above, the supplied y is the laboratory reporting limit,
not a replacement observation. below points toward decreasing y-domain values;
above points toward increasing y-domain values. Direction stays semantically
correct for reversed ranges and reversed domains. The component performs no
imputation, substitution, model fitting, or inference.
Rows with a nullish/non-finite coordinate or status are omitted. Unknown
non-null statuses throw. A log scale rejects nonpositive reporting limits under
its normal scale contract. defined runs before the accessors and can exclude a
row. Accessors cannot call hooks or write signals during rendering.
style accepts a whole-object signal and shallow field signals. radius
defaults to 4 pixels, fill (observed circles only) and stroke default to
#087f8c, strokeWidth defaults to 1.5 pixels, and opacity defaults to 1.
The censor markers are always open. Zero radius hides all marks. Records retain
source paint order and use two ordinary batched Path targets. Series event
handlers receive ordinary bubbled mark events; they do not infer a datum.
The censored concentration-time assay shows synthetic LLOQ and ULOQ results with an application-owned accessible table.
API details from source
Section titled “API details from source”
CensoredPointSeries
Section titled “CensoredPointSeries”Draws supplied numeric observations as circles and below/above reporting limits as open arrows.
below points toward decreasing y-domain values and above toward increasing y-domain values,
including when the y scale uses a reversed domain or range. The supplied y value remains the
reporting limit; this component never substitutes a measurement, imputes a value, or fits a model.
CensoredPointSeries: <D>({ data: input, x: xInput, y: yInput, censoring: censoringInput, xScale: xId, yScale: yId, defined, style: styleInput, pointerEvents, ...events }: CensoredPointSeriesProps<D>) => JSX.ElementRelated API: CensoredPointSeries, CensoredPointSeriesProps, JSX.
Parameters
Section titled “Parameters”props— Supplied observations, coordinates, reporting statuses, scales, and paint. See CensoredPointSeriesProps.
Returns
Section titled “Returns”Two ordinary batched paths for observed and open censored marks.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/censored-point-series.tsx:131
CensoringStatus
Section titled “CensoringStatus”A supplied assay reporting status. below and above retain the supplied reporting limit.
type CensoringStatus = "observed" | "below" | "above"Related API: CensoringStatus.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/censored-point-series.tsx:19
CensoringAccessor
Section titled “CensoringAccessor”Extracts an observation’s supplied reporting status.
type CensoringAccessor<D> = | { [K in keyof D]-?: D[K] extends CensoringStatus | null | undefined ? K : never; }[keyof D] | (( datum: D, index: number, data: readonly D[], ) => CensoringStatus | null | undefined)Related API: CensoringAccessor, CensoringStatus.
Parameters
Section titled “Parameters”-
datum— Original record being read. -
index— Zero-based source index. -
data— Complete supplied record array.
Returns
Section titled “Returns”The supplied status, or a nullish sentinel that omits the record.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/censored-point-series.tsx:28
CensoredPointSeriesProps
Section titled “CensoredPointSeriesProps”Authored inputs for supplied observed and censored numeric observations.
interface CensoredPointSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptionsRelated API: CensoredPointSeriesProps, PibblEventHandlers, PibblEventParticipationOptions.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/censored-point-series.tsx:59
Properties and methods
Section titled “Properties and methods”
data
readonly data: SignalValue<readonly D[]>Related API: SignalValue.
Original records, or a signal of records. The series performs no imputation or inference.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:62
x
readonly x: LineAccessor<D>Related API: LineAccessor.
Property or callback supplying the numeric horizontal coordinate.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:64
y
readonly y: LineAccessor<D>Related API: LineAccessor.
Property or callback supplying the numeric vertical value or reporting limit.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:66
censoring
readonly censoring: CensoringAccessor<D>Related API: CensoringAccessor.
Property or callback yielding observed, below, or above.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:68
xScale
readonly xScale: ScaleIdRelated API: ScaleId.
Ancestor continuous numeric scale mapping x.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:70
yScale
readonly yScale: ScaleIdRelated API: ScaleId.
Ancestor continuous numeric scale mapping y and its reporting limit.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:72
defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefinedOptional synchronous predicate; excluded rows contribute no mark.
Parameters
Section titled “Parameters”-
datum— Original record being tested. -
index— Zero-based source index. -
data— Complete supplied record array.
Returns
Section titled “Returns”Whether this record contributes a mark.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:79
style (optional)
readonly style?: SignalValue<Readonly<{ readonly radius?: SignalValue<number | undefined>; 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 style; whole-object and shallow field signals are observed by the series.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:81
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
CensoredPointSeriesStyle
Section titled “CensoredPointSeriesStyle”Shared mark paint and local-pixel geometry for CensoredPointSeries.
interface CensoredPointSeriesStyleRelated API: CensoredPointSeriesStyle.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:41
Properties and methods
Section titled “Properties and methods”
radius (optional)
readonly radius?: number | undefinedCircle and open censor marker radius in local pixels; defaults to 4.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:43
fill (optional)
readonly fill?: FillStyle | undefinedRelated API: FillStyle.
Fill for observed circles; defaults to #087f8c. Censor markers remain open.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:45
stroke (optional)
readonly stroke?: StrokeStyle | undefinedRelated API: StrokeStyle.
Outline for circles and open directional censor markers; defaults to #087f8c.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:47
strokeWidth (optional)
readonly strokeWidth?: number | undefinedOutline width in local pixels; defaults to 1.5.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:49
opacity (optional)
readonly opacity?: number | undefinedRelated API: opacity.
Shared paint opacity from zero to one; defaults to 1.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:51
cursor (optional)
readonly cursor?: string | undefinedCursor for painted mark targets.
View source — packages/core/src/features/viz/lib/censored-point-series.tsx:53
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 assay reporting limits: Supplied assay reporting limits. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision dd39ce2. ALPHA — NOT FOR PRODUCTION USE.