ScaleFillSteps2

Three-stop diverging binned fill steps (low/mid/high).

Defaults

helper
scaleFillSteps2
family
color-fill
aesthetic
fill
scale type
binned
options type
Steps2ScaleOptions

Svelte component

import { GGPlot, GeomCol, ScaleFillSteps2 } from "@ggsvelte/svelte";

<GGPlot data={rows} aes={{ x: "x", y: "y", fill: "group" }}>
  <ScaleFillSteps2 />
  <GeomCol />
</GGPlot>

JSON scales

{
  "scales": {
    "fill": {
      "type": "binned"
    }
  }
}

Params

domain

Array<DomainValue>

Explicit semantic domain. Manual/ordinal scales use ordered values; sequential/binned scales use [min, max].

breaks

Array<number | string>

Explicit semantic reference ticks for sequential colorbars or ordered boundaries for binned colorsteps.

reverse

boolean

Reverse the output color range. Default false.

transform

"identity" | "log10" | "sqrt"

Pre-training quantitative transform for sequential/binned color values. log10/sqrt require non-temporal values; ordinal, manual, and identity families do not accept a transform.

oob

"censor" | "squish"

Out-of-bounds policy for an explicit continuous/binned domain: "censor" (default) or "squish".

naValue

string

Color for null/missing values. Default9.

unknownValue

string

Color for invalid, out-of-domain, or unmapped values. Default9.

labels

string

Guide label format: numeric (".1f", ",d", ".0%") or temporal strftime-style text.

guide

GuideSpec

Guide presentation override (legend, colorbar, colorsteps, or none).

low

string

Low-end #rgb/#rrggbb color.

mid

string

Midpoint #rgb/#rrggbb color.

high

string

High-end #rgb/#rrggbb color.

midpoint

number

Data value mapped to mid (default 0 for diverging helpers).

Guide interaction

Colorsteps guide by default for binned color. Use guide helpers or guide: "none" to suppress.

Examples

← All scales · Palettes · Scales and guides