ScaleSizeDiscrete
Discrete size scale for categories (ordinal).
Defaults
- helper
scaleSizeDiscrete- family
numeric-style- aesthetic
size- scale type
ordinal- options type
DiscreteNumericStyleScaleOptions
Also exported as
ScaleSizeOrdinal
Svelte component
import { GGPlot, GeomPoint, ScaleSizeDiscrete } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y", size: "weight" }}>
<ScaleSizeDiscrete />
<GeomPoint />
</GGPlot> JSON scales
{
"scales": {
"size": {
"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.