Skip to content

Estimate-and-interval series

Read as Markdown

Import HorizontalIntervalSeries and VerticalIntervalSeries from @pibbl/core/viz. Both return ordinary Pibbl content with an interval, endpoint caps, and an estimate circle per record. They render supplied results without calculating uncertainty, weighting, pooling, or selecting a statistical method.

import { HorizontalIntervalSeries } from "@pibbl/core/viz";
const effects = [
{ study: "Trial A", effect: 0.72, ciLower: 0.58, ciUpper: 0.89 },
];
<HorizontalIntervalSeries
data={effects}
category="study"
estimate="effect"
lower="ciLower"
upper="ciUpper"
categoryScale="studies"
valueScale="effect"
/>;

Required props are data, category, estimate, lower, upper, categoryScale, and valueScale. data is a readonly array or signal. Accessors are field keys or synchronous (datum, index, data) callbacks. The categorical scale is a PointScale or BarScale; band categories use their centers. The value scale is continuous: linear, UTC, log, or symlog. Bounds and estimate map independently, including reversed ranges. The estimate is not required to lie inside the interval. Interval meaning and units belong in application labels.

defined? excludes rows before other accessors run. Nullish/nonfinite numeric coordinates, missing categories, and categories absent from the declared domain omit the entire row before bounds validation. For included categories, finite reversed bounds throw a row-specific RangeError; equal bounds are allowed. Invalid log inputs throw under the scale contract. Mapping does not clamp or clip. Accessor signal reads belong to the series; accessors cannot call hooks or write signals during rendering.

style accepts a whole-object signal and shallow field signals. Supported fields: radius (default 4 pixels), capSize (full cap length, default 8 pixels), fill (circle fill, default #087f8c), stroke (interval/cap/circle outline, same default), strokeWidth (default 1.5 pixels), lineInteractionWidth (defaults to stroke width), opacity (default 1), and cursor. Geometry sizes are finite and nonnegative; opacity is finite in [0, 1]. Zero radius/cap size hides that part. Per-datum styles and weight-driven marker areas are not supported by these marks.

Records preserve source paint order, painting each interval and caps before its circle. The series composes ordinary Line/Circle targets, rather than allocating a hit rectangle over the row. Series event handlers receive bubbled mark events; events do not infer a datum. Use pointerEvents="none" for decorative marks. Compose normal application-owned row controls for selection and keyboard focus. Core transforms, explicit Clip, scheduled updates, and teardown apply. No layout, second scheduler, or inference engine is introduced.

The clinical forest plot demonstrates synthetic supplied risk ratios and 95% confidence intervals, sorting, row inspection, and an application-owned accessible HTML results table.

Draw supplied numeric intervals horizontally with an estimate circle per category. Missing/non-finite coordinates omit the entire row; reversed bounds reject it. Mapping does not clamp or clip; compose a Clip when required. Marks use ordinary Line/Circle targets, with series handlers receiving their bubbled events.

HorizontalIntervalSeries: <D>(props: HorizontalIntervalSeriesProps<D>) => PibblNode

Related API: HorizontalIntervalSeries, HorizontalIntervalSeriesProps, PibblNode.

  • props — Supplied data, categorical/numeric scale IDs, and shared style.

Ordinary Pibbl content in source order, interval then circle for each row.

HorizontalIntervalSeriesProps

View source — packages/core/src/features/viz/lib/interval-series.tsx:245

Draw supplied numeric intervals vertically with an estimate circle per category. Shares the missing-data, bounds, paint, targeting, and clipping contract of HorizontalIntervalSeries; orientation is explicit in the operation name.

VerticalIntervalSeries: <D>(props: VerticalIntervalSeriesProps<D>) => PibblNode

Related API: VerticalIntervalSeries, VerticalIntervalSeriesProps, PibblNode.

  • props — Supplied data, categorical/numeric scale IDs, and shared style.

Ordinary Pibbl content in source order, interval then circle for each row.

VerticalIntervalSeriesProps

View source — packages/core/src/features/viz/lib/interval-series.tsx:260

Shared local-pixel geometry and paint for estimate-and-interval marks.

interface IntervalSeriesStyle

Related API: IntervalSeriesStyle.

IntervalSeriesProps

View source — packages/core/src/features/viz/lib/interval-series.tsx:22

radius (optional)
readonly radius?: number | undefined

Estimate circle radius in local pixels; defaults to 4.

View source — packages/core/src/features/viz/lib/interval-series.tsx:24

capSize (optional)
readonly capSize?: number | undefined

Full perpendicular length of each endpoint cap; defaults to 8 pixels.

View source — packages/core/src/features/viz/lib/interval-series.tsx:26

fill (optional)
readonly fill?: FillStyle | undefined

Related API: FillStyle.

Estimate circle fill; defaults to #087f8c.

View source — packages/core/src/features/viz/lib/interval-series.tsx:28

stroke (optional)
readonly stroke?: StrokeStyle | undefined

Related API: StrokeStyle.

Interval, cap, and circle outline paint; defaults to #087f8c.

View source — packages/core/src/features/viz/lib/interval-series.tsx:30

strokeWidth (optional)
readonly strokeWidth?: number | undefined

Visible stroke width in local pixels; defaults to 1.5.

View source — packages/core/src/features/viz/lib/interval-series.tsx:32

lineInteractionWidth (optional)
readonly lineInteractionWidth?: number | undefined

Stroke targeting width, independent of visible width; defaults to strokeWidth.

View source — packages/core/src/features/viz/lib/interval-series.tsx:34

opacity (optional)
readonly opacity?: number | undefined

Related API: opacity.

Shared paint opacity from zero to one; defaults to 1.

View source — packages/core/src/features/viz/lib/interval-series.tsx:36

cursor (optional)
readonly cursor?: string | undefined

Cursor for painted mark targets.

View source — packages/core/src/features/viz/lib/interval-series.tsx:38

Explicit supplied estimates and numeric bounds placed at categorical centers.

interface IntervalSeriesProps<D> extends PibblEventHandlers, PibblEventParticipationOptions

Related API: IntervalSeriesProps, PibblEventHandlers, PibblEventParticipationOptions.

HorizontalIntervalSeries

VerticalIntervalSeries

View source — packages/core/src/features/viz/lib/interval-series.tsx:45

data
readonly data: SignalValue<readonly D[]>

Related API: SignalValue.

Original records, or a signal of records; no estimation is performed.

View source — packages/core/src/features/viz/lib/interval-series.tsx:48

category
readonly category: BarCategoryAccessor<D>

Related API: BarCategoryAccessor.

Property or callback supplying a category; missing/unknown categories omit rows.

View source — packages/core/src/features/viz/lib/interval-series.tsx:50

estimate
readonly estimate: LineAccessor<D>

Related API: LineAccessor.

Property or callback supplying the numeric point estimate.

View source — packages/core/src/features/viz/lib/interval-series.tsx:52

lower
readonly lower: LineAccessor<D>

Related API: LineAccessor.

Property or callback supplying the numeric lower bound.

View source — packages/core/src/features/viz/lib/interval-series.tsx:54

upper
readonly upper: LineAccessor<D>

Related API: LineAccessor.

Property or callback supplying the numeric upper bound.

View source — packages/core/src/features/viz/lib/interval-series.tsx:56

categoryScale
readonly categoryScale: ScaleId

Related API: ScaleId.

Ancestor PointScale or BarScale; band categories use their centers.

View source — packages/core/src/features/viz/lib/interval-series.tsx:58

valueScale
readonly valueScale: ScaleId

Related API: ScaleId.

Ancestor continuous numeric scale mapping estimate and both bounds independently.

View source — packages/core/src/features/viz/lib/interval-series.tsx:60

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Optional synchronous predicate; excluded rows contribute no marks.

  • datum — Original record being tested.

  • index — Source index of the record.

  • data — Complete supplied data array.

Whether to include this record’s estimate and interval.

View source — packages/core/src/features/viz/lib/interval-series.tsx:67

style (optional)
readonly style?: SignalValue<Readonly<{ readonly radius?: SignalValue<number | undefined>; readonly capSize?: SignalValue<number | undefined>; readonly fill?: SignalValue<FillStyle | undefined>; 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>; }>> | undefined

Related 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/interval-series.tsx:69

pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefined

Related API: PibblPointerEvents.

Whether this content participates in pointer targeting. See PibblPointerEvents.

View source — packages/core/src/lib/events/types.ts:126

Horizontal estimate-and-interval authoring inputs. See HorizontalIntervalSeries.

type HorizontalIntervalSeriesProps<D> = IntervalSeriesProps<D>

Related API: HorizontalIntervalSeriesProps, IntervalSeriesProps.

View source — packages/core/src/features/viz/lib/interval-series.tsx:73

data
readonly data: SignalValue<readonly D[]>

Related API: SignalValue.

Original records, or a signal of records; no estimation is performed.

View source — packages/core/src/features/viz/lib/interval-series.tsx:48

category
readonly category: BarCategoryAccessor<D>

Related API: BarCategoryAccessor.

Property or callback supplying a category; missing/unknown categories omit rows.

View source — packages/core/src/features/viz/lib/interval-series.tsx:50

estimate
readonly estimate: LineAccessor<D>

Related API: LineAccessor.

Property or callback supplying the numeric point estimate.

View source — packages/core/src/features/viz/lib/interval-series.tsx:52

lower
readonly lower: LineAccessor<D>

Related API: LineAccessor.

Property or callback supplying the numeric lower bound.

View source — packages/core/src/features/viz/lib/interval-series.tsx:54

upper
readonly upper: LineAccessor<D>

Related API: LineAccessor.

Property or callback supplying the numeric upper bound.

View source — packages/core/src/features/viz/lib/interval-series.tsx:56

categoryScale
readonly categoryScale: ScaleId

Related API: ScaleId.

Ancestor PointScale or BarScale; band categories use their centers.

View source — packages/core/src/features/viz/lib/interval-series.tsx:58

valueScale
readonly valueScale: ScaleId

Related API: ScaleId.

Ancestor continuous numeric scale mapping estimate and both bounds independently.

View source — packages/core/src/features/viz/lib/interval-series.tsx:60

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Optional synchronous predicate; excluded rows contribute no marks.

  • datum — Original record being tested.

  • index — Source index of the record.

  • data — Complete supplied data array.

Whether to include this record’s estimate and interval.

View source — packages/core/src/features/viz/lib/interval-series.tsx:67

style (optional)
readonly style?: SignalValue<Readonly<{ readonly radius?: SignalValue<number | undefined>; readonly capSize?: SignalValue<number | undefined>; readonly fill?: SignalValue<FillStyle | undefined>; 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>; }>> | undefined

Related 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/interval-series.tsx:69

pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefined

Related API: PibblPointerEvents.

Whether this content participates in pointer targeting. See PibblPointerEvents.

View source — packages/core/src/lib/events/types.ts:126

Vertical estimate-and-interval authoring inputs. See VerticalIntervalSeries.

type VerticalIntervalSeriesProps<D> = IntervalSeriesProps<D>

Related API: VerticalIntervalSeriesProps, IntervalSeriesProps.

View source — packages/core/src/features/viz/lib/interval-series.tsx:75

data
readonly data: SignalValue<readonly D[]>

Related API: SignalValue.

Original records, or a signal of records; no estimation is performed.

View source — packages/core/src/features/viz/lib/interval-series.tsx:48

category
readonly category: BarCategoryAccessor<D>

Related API: BarCategoryAccessor.

Property or callback supplying a category; missing/unknown categories omit rows.

View source — packages/core/src/features/viz/lib/interval-series.tsx:50

estimate
readonly estimate: LineAccessor<D>

Related API: LineAccessor.

Property or callback supplying the numeric point estimate.

View source — packages/core/src/features/viz/lib/interval-series.tsx:52

lower
readonly lower: LineAccessor<D>

Related API: LineAccessor.

Property or callback supplying the numeric lower bound.

View source — packages/core/src/features/viz/lib/interval-series.tsx:54

upper
readonly upper: LineAccessor<D>

Related API: LineAccessor.

Property or callback supplying the numeric upper bound.

View source — packages/core/src/features/viz/lib/interval-series.tsx:56

categoryScale
readonly categoryScale: ScaleId

Related API: ScaleId.

Ancestor PointScale or BarScale; band categories use their centers.

View source — packages/core/src/features/viz/lib/interval-series.tsx:58

valueScale
readonly valueScale: ScaleId

Related API: ScaleId.

Ancestor continuous numeric scale mapping estimate and both bounds independently.

View source — packages/core/src/features/viz/lib/interval-series.tsx:60

defined (optional)
readonly defined?: ((datum: D, index: number, data: readonly D[]) => boolean) | undefined

Optional synchronous predicate; excluded rows contribute no marks.

  • datum — Original record being tested.

  • index — Source index of the record.

  • data — Complete supplied data array.

Whether to include this record’s estimate and interval.

View source — packages/core/src/features/viz/lib/interval-series.tsx:67

style (optional)
readonly style?: SignalValue<Readonly<{ readonly radius?: SignalValue<number | undefined>; readonly capSize?: SignalValue<number | undefined>; readonly fill?: SignalValue<FillStyle | undefined>; 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>; }>> | undefined

Related 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/interval-series.tsx:69

pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefined

Related API: PibblPointerEvents.

Whether this content participates in pointer targeting. See PibblPointerEvents.

View source — packages/core/src/lib/events/types.ts:126

Read the Data visualization companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.

Documentation built with @pibbl/core 0.0.2, revision dd39ce2. ALPHA — NOT FOR PRODUCTION USE.