# 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.

```tsx
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

<span id="api-IntervalDiamondSeries"></span>

### 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.

```ts
IntervalDiamondSeries: <D>(props: IntervalDiamondSeriesProps<D>) => PibblNode
```

Related API: [IntervalDiamondSeries](/reference/components/interval-diamond-series/), [IntervalDiamondSeriesProps](/reference/components/interval-diamond-series/), [PibblNode](/reference/types/elements-components/#pibblnode).

#### Parameters

- **`props`** — Supplied rows, accessors, categorical/value scales, and shared paint.

#### Returns

One batched Pibbl Path containing the supplied diamonds in source order.

#### See also

[IntervalDiamondSeriesProps](/reference/components/interval-diamond-series/)

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:61](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L61)

<span id="api-IntervalDiamondSeriesProps"></span>

### IntervalDiamondSeriesProps

Supplied summary estimates and bounds placed horizontally at categorical centers.

```ts
interface IntervalDiamondSeriesProps<D> extends Omit<
  IntervalSeriesProps<D>,
  "style"
>
```

Related API: [IntervalDiamondSeriesProps](/reference/components/interval-diamond-series/), [IntervalSeriesProps](/reference/components/interval-series/).

#### See also

[IntervalSeriesProps](/reference/components/interval-series/)

[IntervalDiamondSeriesStyle](/reference/components/interval-diamond-series/)

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:41](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L41)

#### Properties and methods

<span id="api-IntervalDiamondSeriesProps-style"></span>
<details>
<summary>style (optional)</summary>


```ts
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>; }>> | undefined
```

Related API: [SignalValue](/reference/types/signal-inputs/#signalvalue), [FillStyle](/reference/types/styles/#fillstyle), [StrokeStyle](/reference/types/styles/#strokestyle), [opacity](/reference/types/filters/#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](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L46)

</details>

<span id="api-IntervalDiamondSeriesProps-pointerEvents"></span>
<details>
<summary>pointerEvents (optional)</summary>


```ts
readonly pointerEvents?: PibblPointerEvents | undefined
```

Related API: [PibblPointerEvents](/reference/types/events/#pibblpointerevents).

Whether this content participates in pointer targeting. See PibblPointerEvents.

[View source — packages/core/src/lib/events/types.ts:126](/source/packages/core/src/lib/events/types-ts/#L126)

</details>

<span id="api-IntervalDiamondSeriesProps-data"></span>
<details>
<summary>data</summary>


```ts
readonly data: SignalValue<readonly D[]>
```

Related API: [SignalValue](/reference/types/signal-inputs/#signalvalue).

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

[View source — packages/core/src/features/viz/lib/interval-series.tsx:48](/source/packages/core/src/features/viz/lib/interval-series-tsx/#L48)

</details>

<span id="api-IntervalDiamondSeriesProps-category"></span>
<details>
<summary>category</summary>


```ts
readonly category: BarCategoryAccessor<D>
```

Related API: [BarCategoryAccessor](/reference/components/bar-series/).

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

[View source — packages/core/src/features/viz/lib/interval-series.tsx:50](/source/packages/core/src/features/viz/lib/interval-series-tsx/#L50)

</details>

<span id="api-IntervalDiamondSeriesProps-estimate"></span>
<details>
<summary>estimate</summary>


```ts
readonly estimate: LineAccessor<D>
```

Related API: [LineAccessor](/reference/components/line-series/).

Property or callback supplying the numeric point estimate.

[View source — packages/core/src/features/viz/lib/interval-series.tsx:52](/source/packages/core/src/features/viz/lib/interval-series-tsx/#L52)

</details>

<span id="api-IntervalDiamondSeriesProps-lower"></span>
<details>
<summary>lower</summary>


```ts
readonly lower: LineAccessor<D>
```

Related API: [LineAccessor](/reference/components/line-series/).

Property or callback supplying the numeric lower bound.

[View source — packages/core/src/features/viz/lib/interval-series.tsx:54](/source/packages/core/src/features/viz/lib/interval-series-tsx/#L54)

</details>

<span id="api-IntervalDiamondSeriesProps-upper"></span>
<details>
<summary>upper</summary>


```ts
readonly upper: LineAccessor<D>
```

Related API: [LineAccessor](/reference/components/line-series/).

Property or callback supplying the numeric upper bound.

[View source — packages/core/src/features/viz/lib/interval-series.tsx:56](/source/packages/core/src/features/viz/lib/interval-series-tsx/#L56)

</details>

<span id="api-IntervalDiamondSeriesProps-categoryScale"></span>
<details>
<summary>categoryScale</summary>


```ts
readonly categoryScale: ScaleId
```

Related API: [ScaleId](/reference/components/scale/).

Ancestor PointScale or BarScale; band categories use their centers.

[View source — packages/core/src/features/viz/lib/interval-series.tsx:58](/source/packages/core/src/features/viz/lib/interval-series-tsx/#L58)

</details>

<span id="api-IntervalDiamondSeriesProps-valueScale"></span>
<details>
<summary>valueScale</summary>


```ts
readonly valueScale: ScaleId
```

Related API: [ScaleId](/reference/components/scale/).

Ancestor continuous numeric scale mapping estimate and both bounds independently.

[View source — packages/core/src/features/viz/lib/interval-series.tsx:60](/source/packages/core/src/features/viz/lib/interval-series-tsx/#L60)

</details>

<span id="api-IntervalDiamondSeriesProps-defined"></span>
<details>
<summary>defined (optional)</summary>


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

Optional synchronous predicate; excluded rows contribute no marks.

##### Parameters

- **`datum`** — Original record being tested.

- **`index`** — Source index of the record.

- **`data`** — Complete supplied data array.

##### Returns

Whether to include this record's estimate and interval.

[View source — packages/core/src/features/viz/lib/interval-series.tsx:67](/source/packages/core/src/features/viz/lib/interval-series-tsx/#L67)

</details>

<span id="api-IntervalDiamondSeriesStyle"></span>

### IntervalDiamondSeriesStyle

Local-pixel height and shared paint for supplied summary diamonds.

```ts
interface IntervalDiamondSeriesStyle
```

Related API: [IntervalDiamondSeriesStyle](/reference/components/interval-diamond-series/).

#### See also

[IntervalDiamondSeries](/reference/components/interval-diamond-series/)

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:20](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L20)

#### Properties and methods

<span id="api-IntervalDiamondSeriesStyle-height"></span>
<details>
<summary>height (optional)</summary>


```ts
readonly height?: number | undefined
```

Full perpendicular height in local pixels; defaults to 12. Zero hides marks.

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:22](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L22)

</details>

<span id="api-IntervalDiamondSeriesStyle-fill"></span>
<details>
<summary>fill (optional)</summary>


```ts
readonly fill?: FillStyle | undefined
```

Related API: [FillStyle](/reference/types/styles/#fillstyle).

Diamond interior paint; defaults to #087f8c.

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:24](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L24)

</details>

<span id="api-IntervalDiamondSeriesStyle-stroke"></span>
<details>
<summary>stroke (optional)</summary>


```ts
readonly stroke?: StrokeStyle | undefined
```

Related API: [StrokeStyle](/reference/types/styles/#strokestyle).

Diamond outline paint; defaults to #087f8c.

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:26](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L26)

</details>

<span id="api-IntervalDiamondSeriesStyle-strokeWidth"></span>
<details>
<summary>strokeWidth (optional)</summary>


```ts
readonly strokeWidth?: number | undefined
```

Visible outline width in local pixels; defaults to 1.5.

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:28](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L28)

</details>

<span id="api-IntervalDiamondSeriesStyle-lineInteractionWidth"></span>
<details>
<summary>lineInteractionWidth (optional)</summary>


```ts
readonly lineInteractionWidth?: number | undefined
```

Outline targeting width in local pixels; defaults to strokeWidth.

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:30](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L30)

</details>

<span id="api-IntervalDiamondSeriesStyle-opacity"></span>
<details>
<summary>opacity (optional)</summary>


```ts
readonly opacity?: number | undefined
```

Related API: [opacity](/reference/types/filters/#opacity).

Shared opacity from zero to one; defaults to 1.

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:32](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L32)

</details>

<span id="api-IntervalDiamondSeriesStyle-cursor"></span>
<details>
<summary>cursor (optional)</summary>


```ts
readonly cursor?: string | undefined
```

Cursor shown over painted diamonds.

[View source — packages/core/src/features/viz/lib/interval-diamond-series.tsx:34](/source/packages/core/src/features/viz/lib/interval-diamond-series-tsx/#L34)

</details>

## Implementation guidance for agents

Read the [Data visualization companion](/agents/topics/visualization/) for ownership, adaptation, failure modes, and verification. [Agent start](/agents/) provides the version-selection workflow.

## Complete minimal examples

- [Supplied summary diamonds](/minimal-examples/viz/interval-diamond-series/): Supplied summary diamonds. [Plain source](/minimal/viz/interval-diamond-series.tsx)
## Documentation version

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