ScaleAlphaOrdinal
Discrete alpha scale for categories (ordinal). ggplot2 *Ordinal alias — same binding as ScaleAlphaDiscrete.
Defaults
- helper
scaleAlphaOrdinal- family
numeric-style- aesthetic
alpha- scale type
ordinal- options type
DiscreteNumericStyleScaleOptions
Alias
This component re-exports ScaleAlphaDiscrete (same binding). Prefer the canonical spelling in new code.
Svelte component
import { GGPlot, GeomPoint, ScaleAlphaOrdinal } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y", alpha: "weight" }}>
<ScaleAlphaOrdinal />
<GeomPoint />
</GGPlot> JSON scales
{
"scales": {
"alpha": {
"type": "ordinal"
}
}
} Params
domainArray<DomainValue>Explicit semantic domain. Continuous scales use [min, max]; ordinal uses ordered values.
domainMode"grow" | "data"Ordinal domain stability: "grow" (default) preserves assignments across filters; "data" rebuilds from current data.
rangeArray<number>Explicit output range for the mapped aesthetic.
reversebooleanReverse the scale's output direction. Default false.
naValuenumberReplacement for missing/null source values.
unknownValuenumberReplacement for invalid, out-of-domain, or unmapped values.
onExhaust"cycle" | "error"Ordinal palette exhaustion policy: "cycle" (default) with a warning, or "error".
guideGuideSpecGuide presentation override (legend, colorbar, colorsteps, or none).
Guide interaction
Legend guide for the mapped style channel. Set guide: "none" to hide.