# Symlog and point scales

Import from `@pibbl/core/viz`. Each family has its own provider and hook with a
fixed return type. There is no family selector or argument-dependent return.

## SymlogScale

`SymlogScale(props: SymlogScaleProps): PibblNode` accepts all `LinearScaleProps`
and `constant?: SignalValue<number>` (default 1). `id`, `domain`, and `range` are
required. `reverse` defaults to false; style and children are optional.
The domain is two distinct finite numbers with a finite nonzero span; negative,
zero, positive, and descending endpoints are supported. Range is `"width"`,
`"height"`, or two finite coordinates. Reversal affects range only.

`useSymlogScale(id: ScaleId): Signal<ResolvedSymlogScale>` returns a stable shared
readonly signal. Its frozen snapshot has `type: "symlog"`, frozen `domain` and
`range`, `frame`, `constant`, and:

- `map(value: number): number`: applies `sign(value) * log1p(abs(value)/constant)`
  before linear interpolation. Near zero it is approximately linear; farther
  away it compresses large magnitudes. Finite values outside the domain extrapolate.
- `invert(pixel: number): number`: applies the inverse signed `expm1` transform.
  Original range endpoints return exact domain endpoints. Negative zero becomes zero.
- `ticks(count = 5): readonly number[]`: readable 1/2/5 decimal ticks in **data
  space**, using `linearTicks(domain, { count })`. Count is a target, not exact;
  at most 100 values are returned. Count must be an integer 2–100. Aligned zero
  appears when the domain crosses zero. Endpoints appear only if aligned.

`constant` must be finite and positive, in the same units as the data. Changing
it changes geometry; it is not only a formatting choice. No automatic nicening
or clamping occurs. All provider inputs except identity/children accept the same
signals as LinearScale. Changes to constant publish new snapshots. Hook `.get()`
tracks dependencies; provider unmount releases its subscriptions.

Invalid domains, ranges, constants, nonfinite map/invert inputs or outputs,
collapsed transformed domains, and collapsed-range inversion throw `RangeError`.
A collapsed range can still map. Tick precision limits match `linearTicks`.
Missing/mismatched hook IDs and invalid reverse/identity follow existing scale
errors. Existing numeric axes, marks, `ScaleAdjust`, and inspection queries work
with symlog, including signed coordinates and zero.

## PointScale

`PointScale(props: PointScaleProps): PibblNode` requires `id`, `domain`, and
`range`. Domain is an ordered array of unique strings or finite numbers; numeric
`1` and string `"1"` differ, while `0` and `-0` are duplicates. Empty and singleton
domains are valid. Range, reverse (default false), style, and children have the
same meaning as LinearScale. `padding?: SignalValue<number>` defaults to zero;
it is nonnegative outer spacing in step units, not pixels. Zero padding places
first and last categories at the range endpoints. Categories never sort themselves;
reverse the domain array to change order, or reverse the range to flip mapping.

`usePointScale(id: ScaleId): Signal<ResolvedPointScale>` returns a stable shared
readonly signal. Snapshot fields: `type: "point"`, frozen `domain` and `range`,
`frame`, resolved `padding`, and nonnegative `step`. There is no bandwidth.

- `map(category: BandCategory): number | undefined`: the category's point,
  or undefined for an unknown category. No domain mutation occurs.
- `invert(pixel: number): BandCategory | undefined`: nearest-category lookup,
  not a continuous inverse. Ties choose the first category in domain order;
  outside coordinates choose the nearest endpoint. Empty domains return
  undefined. Singleton or collapsed ranges choose the first category.
- `ticks(count = 5): BandDomain`: at most count categories, sampled in domain
  order. Count is an integer 0–100; zero returns an empty frozen array, one
  returns the first category. Counts of two or more retain endpoints.

Empty domains have step zero; singleton categories map to the range midpoint.
Collapsed ranges place all categories at that pixel. Padding arithmetic must
remain finite. Invalid/duplicate categories throw `TypeError`; invalid padding,
range/allocation, invert coordinate, or count throws `RangeError`. No implicit
category coercion occurs. Domain, range, reverse, padding, and styles accept
signals; snapshots update with allocation, and unmount releases subscriptions.

Axis ticks use the exact point (no half-band offset). `ScaleAdjust` accepts
string/number point coordinates for ordinary custom marks; unknown categories
throw `RangeError`. Its continuous coordinates still require numbers. Numeric
`LineSeries`, `PointSeries`, `PlotSeries`, and numeric inspection queries do not
accept PointScale: use the hook for custom mark coordinates and `invert` for
category inspection. This preserves their numeric contracts.

## Minimal runnable composition

The [signed Census example](/playground/#/examples/composition/viz-signed-population) is
editable and uses both providers and hooks with real data. This minimal mount
also demonstrates both families and categorical custom-mark placement:

```tsx
import { Circle, Group, pibbl } from "@pibbl/core";
import { Axis, PointScale, SymlogScale, ScaleAdjust } from "@pibbl/core/viz";
export default function mount(canvas: HTMLCanvasElement) {
  return pibbl(
    canvas,
    <Group style={{ translateX: 60, translateY: 30 }}>
      <PointScale id="state" domain={["A", "B", "C"]} range={[0, 120]}>
        <SymlogScale
          id="change"
          domain={[-100, 100]}
          range={[0, 240]}
          constant={10}
        >
          <Axis scale="state" position="left" tickValues={["A", "B", "C"]} />
          <Axis scale="change" position="top" />
          <ScaleAdjust x={-30} xScale="change" y="B" yScale="state">
            <Circle style={{ radius: 5, fill: "teal" }} />
          </ScaleAdjust>
        </SymlogScale>
      </PointScale>
    </Group>,
  );
}
```

Keep category identities visible when resizing. Units and the symlog transition
constant belong in chart context because equal distances do not represent equal
additive changes.

Scale snapshots are computed lazily. Domain/mapping validation occurs when a
consumer reads the scale signal (for example, an Axis or a hook's `.get()`),
not merely because an otherwise unused provider appears in the tree.

## API details from source

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

### SymlogScale

Provides a named symlog mapping to descendant visualization components.

```ts
SymlogScale: (props: SymlogScaleProps) => PibblNode
```

Related API: [SymlogScale](/reference/components/symlog-point-scales/), [SymlogScaleProps](/reference/components/symlog-point-scales/), [PibblNode](/reference/types/elements-components/#pibblnode).

#### Parameters

- **`props`** — Identity, domain, range, and constant. See [SymlogScaleProps](/reference/components/symlog-point-scales/).

#### Returns

Descendant content within the scale scope.

[View source — packages/core/src/features/viz/lib/symlog-scale-component.ts:10](/source/packages/core/src/features/viz/lib/symlog-scale-component-ts/#L10)

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

### useSymlogScale

Reads an ancestor symlog scale as a stable shared readonly signal.

```ts
useSymlogScale: (id: ScaleId) => Signal<ResolvedSymlogScale>
```

Related API: [useSymlogScale](/reference/components/symlog-point-scales/), [ScaleId](/reference/components/scale/), [Signal](/reference/types/canvas-runtime/#signal), [ResolvedSymlogScale](/reference/components/symlog-point-scales/).

#### Parameters

- **`id`** — Ancestor scale identity. See [ScaleId](/reference/components/scale/).

#### Returns

The reactive mapping. See [ResolvedSymlogScale](/reference/components/symlog-point-scales/).

[View source — packages/core/src/features/viz/lib/use-symlog-scale.ts:10](/source/packages/core/src/features/viz/lib/use-symlog-scale-ts/#L10)

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

### SymlogScaleProps

Signed logarithmic scale inputs. See LinearScaleProps.

```ts
interface SymlogScaleProps extends LinearScaleProps
```

Related API: [SymlogScaleProps](/reference/components/symlog-point-scales/), [LinearScaleProps](/reference/components/scale/).

[View source — packages/core/src/features/viz/lib/types.ts:259](/source/packages/core/src/features/viz/lib/types-ts/#L259)

#### Properties and methods

<span id="api-SymlogScaleProps-constant"></span>
<details>
<summary>constant (optional)</summary>


```ts
readonly constant?: SignalValue<number> | undefined
```

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

Positive linear-to-log transition constant in domain units, default 1.

[View source — packages/core/src/features/viz/lib/types.ts:261](/source/packages/core/src/features/viz/lib/types-ts/#L261)

</details>

<span id="api-SymlogScaleProps-id"></span>
<details>
<summary>id</summary>


```ts
readonly id: ScaleId
```

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

Stable identifier of this resource or connection. See ScaleId.

[View source — packages/core/src/features/viz/lib/types.ts:75](/source/packages/core/src/features/viz/lib/types-ts/#L75)

</details>

<span id="api-SymlogScaleProps-domain"></span>
<details>
<summary>domain</summary>


```ts
readonly domain: SignalValue<LinearDomain>
```

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

Data values or endpoints accepted by the scale. See SignalValue, LinearDomain
.

[View source — packages/core/src/features/viz/lib/types.ts:80](/source/packages/core/src/features/viz/lib/types-ts/#L80)

</details>

<span id="api-SymlogScaleProps-range"></span>
<details>
<summary>range</summary>


```ts
readonly range: SignalValue<ScaleRange>
```

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

Logical output coordinates produced by the scale. See SignalValue, ScaleRange
.

[View source — packages/core/src/features/viz/lib/types.ts:85](/source/packages/core/src/features/viz/lib/types-ts/#L85)

</details>

<span id="api-SymlogScaleProps-reverse"></span>
<details>
<summary>reverse (optional)</summary>


```ts
readonly reverse?: SignalValue<boolean> | undefined
```

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

Whether to reverse the direction of the mapping or guide. See SignalValue.

[View source — packages/core/src/features/viz/lib/types.ts:87](/source/packages/core/src/features/viz/lib/types-ts/#L87)

</details>

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


<details>
<summary>Full type declaration</summary>

```ts
readonly style?: SignalValue<Readonly<{ left?: SignalValue<number | `${number}%` | undefined>; top?: SignalValue<number | `${number}%` | undefined>; width?: SignalValue<Length | undefined>; height?: SignalValue<Length | undefined>; alignSelf?: SignalValue<"auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined>; justifySelf?: SignalValue<"auto" | "center" | "end" | "start" | "stretch" | undefined>; flexBasis?: SignalValue<Length | undefined>; flexGrow?: SignalValue<number | undefined>; flexShrink?: SignalValue<number | undefined>; gridColumnStart?: SignalValue<number | undefined>; gridColumnSpan?: SignalValue<number | undefined>; gridRowStart?: SignalValue<number | undefined>; gridRowSpan?: SignalValue<number | undefined>; transition?: SignalValue<PibblTransitionBinding | undefined>; custom?: unknown; filter?: SignalValue<PibblFilter | readonly PibblFilter[] | undefined>; }>> | undefined
```

</details>

Related API: [SignalValue](/reference/types/signal-inputs/#signalvalue), [Length](/reference/types/layout/#length), [PibblTransitionBinding](/reference/hooks/use-visibility-transition/), [PibblFilter](/reference/types/filters/#pibblfilter).

Declared presentation and layout properties. See SignalValue, SignalStyle,
ScaleLayoutStyle.

[View source — packages/core/src/features/viz/lib/types.ts:92](/source/packages/core/src/features/viz/lib/types-ts/#L92)

</details>

<span id="api-SymlogScaleProps-children"></span>
<details>
<summary>children (optional)</summary>


```ts
readonly children?: PibblNode
```

Related API: [PibblNode](/reference/types/elements-components/#pibblnode).

Descendant content or the callback that supplies it. See PibblNode.

[View source — packages/core/src/features/viz/lib/types.ts:94](/source/packages/core/src/features/viz/lib/types-ts/#L94)

</details>

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

### ResolvedSymlogScale

Signed logarithmic mapping through zero. See ResolvedLinearScale.

```ts
interface ResolvedSymlogScale extends Omit<ResolvedLinearScale, "type">
```

Related API: [ResolvedSymlogScale](/reference/components/symlog-point-scales/), [ResolvedLinearScale](/reference/components/scale/).

[View source — packages/core/src/features/viz/lib/types.ts:264](/source/packages/core/src/features/viz/lib/types-ts/#L264)

#### Properties and methods

<span id="api-ResolvedSymlogScale-type"></span>
<details>
<summary>type</summary>


```ts
readonly type: "symlog"
```

Signed logarithmic discriminant. See SymlogScaleProps.

[View source — packages/core/src/features/viz/lib/types.ts:266](/source/packages/core/src/features/viz/lib/types-ts/#L266)

</details>

<span id="api-ResolvedSymlogScale-constant"></span>
<details>
<summary>constant</summary>


```ts
readonly constant: number
```

Positive transition constant. See SymlogScaleProps.

[View source — packages/core/src/features/viz/lib/types.ts:268](/source/packages/core/src/features/viz/lib/types-ts/#L268)

</details>

<span id="api-ResolvedSymlogScale-domain"></span>
<details>
<summary>domain</summary>


```ts
readonly domain: LinearDomain
```

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

Data values or endpoints accepted by the scale. See LinearDomain.

[View source — packages/core/src/features/viz/lib/types.ts:193](/source/packages/core/src/features/viz/lib/types-ts/#L193)

</details>

<span id="api-ResolvedSymlogScale-range"></span>
<details>
<summary>range</summary>


```ts
readonly range: readonly [number, number]
```

Logical output coordinates produced by the scale. See ResolvedLinearScale.

[View source — packages/core/src/features/viz/lib/types.ts:195](/source/packages/core/src/features/viz/lib/types-ts/#L195)

</details>

<span id="api-ResolvedSymlogScale-frame"></span>
<details>
<summary>frame</summary>


```ts
readonly frame: Readonly<LayoutBox>
```

Related API: [LayoutBox](/reference/types/layout/#layoutbox).

Resolved layout frame containing the scale. See LayoutBox.

[View source — packages/core/src/features/viz/lib/types.ts:197](/source/packages/core/src/features/viz/lib/types-ts/#L197)

</details>

<span id="api-ResolvedSymlogScale-map"></span>
<details>
<summary>map</summary>


```ts
map: (value: number) => number
```

Maps a numeric domain value to a logical range coordinate. See ResolvedLinearScale.

##### Parameters

- **`value`** — Numeric domain coordinate.

##### Returns

The corresponding range coordinate.

[View source — packages/core/src/features/viz/lib/types.ts:203](/source/packages/core/src/features/viz/lib/types-ts/#L203)

</details>

<span id="api-ResolvedSymlogScale-invert"></span>
<details>
<summary>invert</summary>


```ts
invert: (pixel: number) => number
```

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

Maps a logical range coordinate back into the numeric domain. See ResolvedLinearScale
.

##### Parameters

- **`pixel`** — Coordinate in the scale's pixel range.

##### Returns

The corresponding numeric domain value.

[View source — packages/core/src/features/viz/lib/types.ts:210](/source/packages/core/src/features/viz/lib/types-ts/#L210)

</details>

<span id="api-ResolvedSymlogScale-ticks"></span>
<details>
<summary>ticks</summary>


```ts
ticks: (count?: number) => readonly number[]
```

Returns representative numeric tick values for the requested count. See
ResolvedLinearScale.

##### Parameters

- **`count`** — Suggested number of ticks.

##### Returns

Tick values in domain coordinates.

[View source — packages/core/src/features/viz/lib/types.ts:217](/source/packages/core/src/features/viz/lib/types-ts/#L217)

</details>

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

### PointScale

Provides a named point mapping to descendant visualization components.

```ts
PointScale: (props: PointScaleProps) => PibblNode
```

Related API: [PointScale](/reference/components/symlog-point-scales/), [PointScaleProps](/reference/components/symlog-point-scales/), [PibblNode](/reference/types/elements-components/#pibblnode).

#### Parameters

- **`props`** — Identity, domain, range, and padding. See [PointScaleProps](/reference/components/symlog-point-scales/).

#### Returns

Descendant content within the scale scope.

[View source — packages/core/src/features/viz/lib/point-scale-component.ts:10](/source/packages/core/src/features/viz/lib/point-scale-component-ts/#L10)

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

### usePointScale

Reads an ancestor point scale as a stable shared readonly signal.

```ts
usePointScale: (id: ScaleId) => Signal<ResolvedPointScale>
```

Related API: [usePointScale](/reference/components/symlog-point-scales/), [ScaleId](/reference/components/scale/), [Signal](/reference/types/canvas-runtime/#signal), [ResolvedPointScale](/reference/components/symlog-point-scales/).

#### Parameters

- **`id`** — Ancestor scale identity. See [ScaleId](/reference/components/scale/).

#### Returns

The reactive mapping. See [ResolvedPointScale](/reference/components/symlog-point-scales/).

[View source — packages/core/src/features/viz/lib/use-point-scale.ts:10](/source/packages/core/src/features/viz/lib/use-point-scale-ts/#L10)

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

### PointScaleProps

Equally spaced categorical positions. See LinearScaleProps.

```ts
interface PointScaleProps extends Omit<LinearScaleProps, "domain">
```

Related API: [PointScaleProps](/reference/components/symlog-point-scales/), [LinearScaleProps](/reference/components/scale/).

[View source — packages/core/src/features/viz/lib/types.ts:271](/source/packages/core/src/features/viz/lib/types-ts/#L271)

#### Properties and methods

<span id="api-PointScaleProps-domain"></span>
<details>
<summary>domain</summary>


```ts
readonly domain: SignalValue<BandDomain>
```

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

Ordered unique string or finite numeric categories; accepts signals. See BandDomain.

[View source — packages/core/src/features/viz/lib/types.ts:273](/source/packages/core/src/features/viz/lib/types-ts/#L273)

</details>

<span id="api-PointScaleProps-padding"></span>
<details>
<summary>padding (optional)</summary>


```ts
readonly padding?: SignalValue<number> | undefined
```

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

Nonnegative outer padding in step units, default 0.

[View source — packages/core/src/features/viz/lib/types.ts:275](/source/packages/core/src/features/viz/lib/types-ts/#L275)

</details>

<span id="api-PointScaleProps-id"></span>
<details>
<summary>id</summary>


```ts
readonly id: ScaleId
```

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

Stable identifier of this resource or connection. See ScaleId.

[View source — packages/core/src/features/viz/lib/types.ts:75](/source/packages/core/src/features/viz/lib/types-ts/#L75)

</details>

<span id="api-PointScaleProps-range"></span>
<details>
<summary>range</summary>


```ts
readonly range: SignalValue<ScaleRange>
```

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

Logical output coordinates produced by the scale. See SignalValue, ScaleRange
.

[View source — packages/core/src/features/viz/lib/types.ts:85](/source/packages/core/src/features/viz/lib/types-ts/#L85)

</details>

<span id="api-PointScaleProps-reverse"></span>
<details>
<summary>reverse (optional)</summary>


```ts
readonly reverse?: SignalValue<boolean> | undefined
```

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

Whether to reverse the direction of the mapping or guide. See SignalValue.

[View source — packages/core/src/features/viz/lib/types.ts:87](/source/packages/core/src/features/viz/lib/types-ts/#L87)

</details>

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


<details>
<summary>Full type declaration</summary>

```ts
readonly style?: SignalValue<Readonly<{ left?: SignalValue<number | `${number}%` | undefined>; top?: SignalValue<number | `${number}%` | undefined>; width?: SignalValue<Length | undefined>; height?: SignalValue<Length | undefined>; alignSelf?: SignalValue<"auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefined>; justifySelf?: SignalValue<"auto" | "center" | "end" | "start" | "stretch" | undefined>; flexBasis?: SignalValue<Length | undefined>; flexGrow?: SignalValue<number | undefined>; flexShrink?: SignalValue<number | undefined>; gridColumnStart?: SignalValue<number | undefined>; gridColumnSpan?: SignalValue<number | undefined>; gridRowStart?: SignalValue<number | undefined>; gridRowSpan?: SignalValue<number | undefined>; transition?: SignalValue<PibblTransitionBinding | undefined>; custom?: unknown; filter?: SignalValue<PibblFilter | readonly PibblFilter[] | undefined>; }>> | undefined
```

</details>

Related API: [SignalValue](/reference/types/signal-inputs/#signalvalue), [Length](/reference/types/layout/#length), [PibblTransitionBinding](/reference/hooks/use-visibility-transition/), [PibblFilter](/reference/types/filters/#pibblfilter).

Declared presentation and layout properties. See SignalValue, SignalStyle,
ScaleLayoutStyle.

[View source — packages/core/src/features/viz/lib/types.ts:92](/source/packages/core/src/features/viz/lib/types-ts/#L92)

</details>

<span id="api-PointScaleProps-children"></span>
<details>
<summary>children (optional)</summary>


```ts
readonly children?: PibblNode
```

Related API: [PibblNode](/reference/types/elements-components/#pibblnode).

Descendant content or the callback that supplies it. See PibblNode.

[View source — packages/core/src/features/viz/lib/types.ts:94](/source/packages/core/src/features/viz/lib/types-ts/#L94)

</details>

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

### ResolvedPointScale

Zero-width categorical point positions. See ResolvedBandScale.

```ts
interface ResolvedPointScale extends Omit<
  ResolvedBandScale,
  "type" | "bandwidth"
>
```

Related API: [ResolvedPointScale](/reference/components/symlog-point-scales/), [ResolvedBandScale](/reference/components/scale/).

[View source — packages/core/src/features/viz/lib/types.ts:278](/source/packages/core/src/features/viz/lib/types-ts/#L278)

#### Properties and methods

<span id="api-ResolvedPointScale-type"></span>
<details>
<summary>type</summary>


```ts
readonly type: "point"
```

Categorical point discriminant. See PointScaleProps.

[View source — packages/core/src/features/viz/lib/types.ts:283](/source/packages/core/src/features/viz/lib/types-ts/#L283)

</details>

<span id="api-ResolvedPointScale-padding"></span>
<details>
<summary>padding</summary>


```ts
readonly padding: number
```

Resolved outer padding. See PointScaleProps.

[View source — packages/core/src/features/viz/lib/types.ts:285](/source/packages/core/src/features/viz/lib/types-ts/#L285)

</details>

<span id="api-ResolvedPointScale-invert"></span>
<details>
<summary>invert</summary>


```ts
invert: (pixel: number) => BandCategory | undefined
```

Related API: [invert](/reference/types/filters/#invert), [BandCategory](/reference/components/scale/).

Finds the nearest category, clamping outside coordinates; ties choose first domain order.

##### Parameters

- **`pixel`** — Finite range coordinate.

##### Returns

Category or undefined for an empty domain. See [BandCategory](/reference/components/scale/).

[View source — packages/core/src/features/viz/lib/types.ts:291](/source/packages/core/src/features/viz/lib/types-ts/#L291)

</details>

<span id="api-ResolvedPointScale-ticks"></span>
<details>
<summary>ticks</summary>


```ts
ticks: (count?: number) => BandDomain
```

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

Selects evenly spaced categories including endpoints when count permits.

##### Parameters

- **`count`** — Integer maximum count 0–100, default 5.

##### Returns

Frozen categories in domain order. See [BandDomain](/reference/components/scale/).

[View source — packages/core/src/features/viz/lib/types.ts:297](/source/packages/core/src/features/viz/lib/types-ts/#L297)

</details>

<span id="api-ResolvedPointScale-domain"></span>
<details>
<summary>domain</summary>


```ts
readonly domain: BandDomain
```

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

Data values or endpoints accepted by the scale. See BandDomain.

[View source — packages/core/src/features/viz/lib/types.ts:164](/source/packages/core/src/features/viz/lib/types-ts/#L164)

</details>

<span id="api-ResolvedPointScale-range"></span>
<details>
<summary>range</summary>


```ts
readonly range: readonly [number, number]
```

Logical output coordinates produced by the scale. See ResolvedBandScale.

[View source — packages/core/src/features/viz/lib/types.ts:166](/source/packages/core/src/features/viz/lib/types-ts/#L166)

</details>

<span id="api-ResolvedPointScale-frame"></span>
<details>
<summary>frame</summary>


```ts
readonly frame: Readonly<LayoutBox>
```

Related API: [LayoutBox](/reference/types/layout/#layoutbox).

Resolved layout frame containing the scale. See LayoutBox.

[View source — packages/core/src/features/viz/lib/types.ts:168](/source/packages/core/src/features/viz/lib/types-ts/#L168)

</details>

<span id="api-ResolvedPointScale-step"></span>
<details>
<summary>step</summary>


```ts
readonly step: number
```

Distance between successive band starts. See ResolvedBandScale.

[View source — packages/core/src/features/viz/lib/types.ts:172](/source/packages/core/src/features/viz/lib/types-ts/#L172)

</details>

<span id="api-ResolvedPointScale-map"></span>
<details>
<summary>map</summary>


```ts
map: (value: BandCategory) => number | undefined
```

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

Maps a category to its band coordinate, or returns undefined for an unknown category. See
ResolvedBandScale .

##### Parameters

- **`value`** — Category to locate in the domain. See [BandCategory](/reference/components/scale/).

##### Returns

The category's range position, or undefined if it is absent from the domain.

[View source — packages/core/src/features/viz/lib/types.ts:179](/source/packages/core/src/features/viz/lib/types-ts/#L179)

</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

- [Daily inventory changes](/minimal-examples/viz/symlog-scale/): Negative means shipped; positive means received. [Plain source](/minimal/viz/symlog-scale.tsx)
- [Checkpoints in a review](/minimal-examples/viz/point-scale/): Categories have equal spacing, not numeric distance. [Plain source](/minimal/viz/point-scale.tsx)
## Documentation version

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