@urban-toolkit/autk-plot / PlotStyle
Class: PlotStyle
Defined in: plot-style.ts:12
Global style helpers shared by all plot implementations.
PlotStyle centralizes the base and highlighted colors applied to marks during selection updates.
Values are static and process-wide for the package runtime. Updating them affects all plots that read style values after the update.
Constructors
Constructor
new PlotStyle():
PlotStyle
Returns
PlotStyle
Properties
_default
protectedstatic_default:`#${string}`='#bfbfbf'
Defined in: plot-style.ts:14
Default fill/stroke color used for non-selected marks.
_highlight
protectedstatic_highlight:`#${string}`='#5dade2'
Defined in: plot-style.ts:16
Highlight color used for selected marks.
Accessors
default
Get Signature
get
staticdefault():`#${string}`
Defined in: plot-style.ts:22
Gets the default mark color.
Returns
`#${string}`
Hex color used for non-selected marks.
highlight
Get Signature
get
statichighlight():`#${string}`
Defined in: plot-style.ts:30
Gets the highlight mark color.
Returns
`#${string}`
Hex color used for selected marks.
Methods
setDefaultColor()
staticsetDefaultColor(color):void
Defined in: plot-style.ts:54
Updates the global default color used for non-selected marks.
Parameters
color
`#${string}`
Hex color string to apply as the default mark color.
Returns
void
Throws
Never throws.
Example
PlotStyle.setDefaultColor('#cccccc');setHighlightColor()
staticsetHighlightColor(color):void
Defined in: plot-style.ts:42
Updates the global highlight color used by selection styling.
Parameters
color
`#${string}`
Hex color string to apply as the highlight color.
Returns
void
Throws
Never throws.
Example
PlotStyle.setHighlightColor('#ff6600');