Skip to content

@graphty/graphty-element / session / HighlightSpec

Interface: HighlightSpec ​

Defined in: graphty-element/src/session/styles/StylesApi.ts:183

What highlight() is asked for: a run that named a subset, and what that subset looks like.

There is no channel here and no scale, because a highlight says "these ones" rather than "this much": the run's shape already publishes which elements it chose, and the only question left is what being chosen looks like.

Properties ​

field? ​

readonly optional field?: string

Defined in: graphty-element/src/session/styles/StylesApi.ts:187

The field that says which elements were chosen. Defaults to the shape's primary field.


name? ​

readonly optional name?: string

Defined in: graphty-element/src/session/styles/StylesApi.ts:189

What to call the layer. Defaults to the run's label.


run ​

readonly run: RunRef

Defined in: graphty-element/src/session/styles/StylesApi.ts:185

The run, its awaited result, or its bare id. All three are what a caller has in hand.


set? ​

readonly optional set?: Partial<Record<Channel, ChannelValue>>

Defined in: graphty-element/src/session/styles/StylesApi.ts:196

What a chosen element is painted.

Absent, the element's own highlight colour is used. Channels of the half the run did not choose are ignored, so a route's set may name node and edge channels together.