Summary interval diamonds
Import IntervalDiamondSeries from @pibbl/core/viz. It renders supplied
summary results without estimating weights, pooling effects, or calculating
confidence intervals. Use it alongside ordinary study marks in a forest plot.
import { IntervalDiamondSeries, LinearScale, PointScale,} from "@pibbl/core/viz";
const summaries = [ { analysis: "Supplied summary", estimate: 0.72, lower: 0.58, upper: 0.89 },];const result = ( <PointScale id="analyses" domain={["Supplied summary"]} range={[40, 40]}> <LinearScale id="effect" domain={[0, 1.5]} range={[20, 300]}> <IntervalDiamondSeries data={summaries} category="analysis" estimate="estimate" lower="lower" upper="upper" categoryScale="analyses" valueScale="effect" style={{ height: 12 }} /> </LinearScale> </PointScale>);void result;data accepts a readonly array or signal. Accessors accept field keys or
synchronous (datum, index, data) callbacks. categoryScale names an ancestor
PointScale or BarScale; band categories use their centers. valueScale names an
ancestor continuous numeric scale. Lower and upper bounds map to the horizontal
tips; the estimate maps to both perpendicular vertices. Asymmetry is preserved,
including on log scales and reversed ranges. No containment, pooling, or
confidence level is inferred from category labels.
defined excludes rows before coordinate accessors. Missing/nonfinite
coordinates and unknown categories omit the complete row before bounds
validation. Included rows require lower <= estimate <= upper. Equal bounds
are accepted as degenerate outlined geometry. Invalid log inputs reject under
the scale contract. Accessors cannot call hooks or write signals.
Shared style supports whole-object and shallow signals: height (full local
pixel height, default 12), fill and stroke (default #087f8c), strokeWidth
(default 1.5), lineInteractionWidth (defaults to stroke width), opacity
(default 1), and cursor. Sizes must be finite and nonnegative; opacity lies in
[0, 1]. Zero height hides all marks. The series returns one batched ordinary
Path target. Overlapping contours share one fill/stroke operation and opacity;
ordinary handlers do not infer a datum. Use pointerEvents="none" for decorative
summaries. Compose explicit Clip, transforms, labels, row controls, and an HTML
table as needed. No core runtime changes or new resource lifetime are required.
API details from source
Section titled “API details from source”
IntervalDiamondSeries
Section titled “IntervalDiamondSeries”Draw supplied summary estimates as horizontal diamonds; no pooling or inference. Left/right tips map lower/upper, top/bottom map the estimate. Estimates must lie inside the supplied bounds. Missing/nonfinite rows and unknown categories are omitted; reversed bounds and invalid log values reject included rows. Diamonds share one ordinary Path target; handlers receive ordinary events. Mapping does not clamp or clip. Compose a Clip when required.
IntervalDiamondSeries: <D>(props: IntervalDiamondSeriesProps<D>) => PibblNodeRelated API: IntervalDiamondSeries, IntervalDiamondSeriesProps, PibblNode.
Parameters
Section titled “Parameters”props— Supplied rows, accessors, categorical/value scales, and shared paint.
Returns
Section titled “Returns”One batched Pibbl Path containing the supplied diamonds in source order.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:61
IntervalDiamondSeriesProps
Section titled “IntervalDiamondSeriesProps”Supplied summary estimates and bounds placed horizontally at categorical centers.
interface IntervalDiamondSeriesProps<D> extends Omit< IntervalSeriesProps<D>, "style">Related API: IntervalDiamondSeriesProps, IntervalSeriesProps.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:41
Properties and methods
Section titled “Properties and methods”
style (optional)
readonly style?: SignalValue<Readonly<{ readonly height?: 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>; }>> | undefinedRelated API: SignalValue, FillStyle, StrokeStyle, opacity.
Whole-object and shallow field signals are observed; per-datum styling is not supported.
View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:46
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
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: ScaleIdRelated 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: ScaleIdRelated 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) | undefinedOptional synchronous predicate; excluded rows contribute no marks.
Parameters
Section titled “Parameters”-
datum— Original record being tested. -
index— Source index of the record. -
data— Complete supplied data array.
Returns
Section titled “Returns”Whether to include this record’s estimate and interval.
View source — packages/core/src/features/viz/lib/interval-series.tsx:67
IntervalDiamondSeriesStyle
Section titled “IntervalDiamondSeriesStyle”Local-pixel height and shared paint for supplied summary diamonds.
interface IntervalDiamondSeriesStyleRelated API: IntervalDiamondSeriesStyle.
See also
Section titled “See also”View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:20
Properties and methods
Section titled “Properties and methods”
height (optional)
readonly height?: number | undefinedFull perpendicular height in local pixels; defaults to 12. Zero hides marks.
View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:22
fill (optional)
readonly fill?: FillStyle | undefinedRelated API: FillStyle.
Diamond interior paint; defaults to #087f8c.
View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:24
stroke (optional)
readonly stroke?: StrokeStyle | undefinedRelated API: StrokeStyle.
Diamond outline paint; defaults to #087f8c.
View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:26
strokeWidth (optional)
readonly strokeWidth?: number | undefinedVisible outline width in local pixels; defaults to 1.5.
View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:28
lineInteractionWidth (optional)
readonly lineInteractionWidth?: number | undefinedOutline targeting width in local pixels; defaults to strokeWidth.
View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:30
opacity (optional)
readonly opacity?: number | undefinedRelated API: opacity.
Shared opacity from zero to one; defaults to 1.
View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:32
cursor (optional)
readonly cursor?: string | undefinedCursor shown over painted diamonds.
View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:34
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 summary diamonds: Supplied summary diamonds. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision dd39ce2. ALPHA — NOT FOR PRODUCTION USE.