ScaleShapeDiscrete
Discrete shape scale for categories (named symbols).
Defaults
- helper
scaleShapeDiscrete- family
finite-style- aesthetic
shape- scale type
ordinal- options type
DiscreteFiniteStyleScaleOptions<PointShapeName>
Also exported as
ScaleShapeOrdinal
Svelte component
import { GGPlot, GeomPoint, ScaleShapeDiscrete } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y", shape: "group" }}>
<ScaleShapeDiscrete />
<GeomPoint />
</GGPlot> JSON scales
{
"scales": {
"shape": {
"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<"circle" | "triangle" | "square" | "diamond" | "plus" | "cross">Explicit output range for the mapped aesthetic.
reversebooleanReverse the scale's output direction. Default false.
naValue"circle" | "triangle" | "square" | "diamond" | "plus" | "cross"Replacement for missing/null source values.
unknownValue"circle" | "triangle" | "square" | "diamond" | "plus" | "cross"Replacement 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.