ScaleColorManual

Manual color mapping: domain values paired with explicit colors.

Defaults

helper
scaleColorManual
family
color-fill
aesthetic
color
scale type
manual
options type
ManualColorScaleOptions

Also exported as

  • ScaleColourManual

Svelte component

import { GGPlot, GeomPoint, ScaleColorManual } from "@ggsvelte/svelte";

<GGPlot data={rows} aes={{ x: "x", y: "y", color: "group" }}>
  <ScaleColorManual />
  <GeomPoint />
</GGPlot>

JSON scales

{
  "scales": {
    "color": {
      "type": "manual"
    }
  }
}

Params

domain

Array<DomainValue>

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

naValue

string

Color for null/missing values. Default9.

unknownValue

string

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

guide

GuideSpec

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

values required

string[]

Colors paired positionally with the explicit or trained domain (required).

Guide interaction

Legend guide for discrete/manual/identity color. Set guide: "none" to hide.

Examples

← All scales · Palettes · Scales and guides