ScaleColorIdentity

Identity color scale: source values are validated #rgb/#rrggbb colors used as-is.

Defaults

helper
scaleColorIdentity
family
color-fill
aesthetic
color
scale type
identity
options type
IdentityColorScaleOptions

Also exported as

  • ScaleColourIdentity

Svelte component

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

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

JSON scales

{
  "scales": {
    "color": {
      "type": "identity"
    }
  }
}

Params

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

Guide interaction

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

Examples

← All scales · Palettes · Scales and guides