Skip to content
pyautark (soon)

@urban-toolkit/autk-plot


@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

protected static _default: `#${string}` = '#bfbfbf'

Defined in: plot-style.ts:14

Default fill/stroke color used for non-selected marks.


_highlight

protected static _highlight: `#${string}` = '#5dade2'

Defined in: plot-style.ts:16

Highlight color used for selected marks.

Accessors

default

Get Signature

get static default(): `#${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 static highlight(): `#${string}`

Defined in: plot-style.ts:30

Gets the highlight mark color.

Returns

`#${string}`

Hex color used for selected marks.

Methods

setDefaultColor()

static setDefaultColor(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

ts
PlotStyle.setDefaultColor('#cccccc');

setHighlightColor()

static setHighlightColor(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

ts
PlotStyle.setHighlightColor('#ff6600');

Released under the MIT License.