Skip to content

@graphty/graphty-element / catalog / ChannelDescriptor

Interface: ChannelDescriptor ​

Defined in: graphty-element/src/session/styles/channels.ts:317

One channel: what it paints, what it accepts, and what the renderer really does with it.

Properties ​

accepts ​

readonly accepts: ChannelValueKind

Defined in: graphty-element/src/session/styles/channels.ts:343

The kind of value it accepts.


caveat? ​

readonly optional caveat?: string

Defined in: graphty-element/src/session/styles/channels.ts:358

What the renderer narrows or does not do -- why nothing is drawn when renderable is false, and what is lost when it is true. Absent when the channel is drawn as declared.


channel ​

readonly channel: Channel

Defined in: graphty-element/src/session/styles/channels.ts:319

The channel's name, which is its identity everywhere.


default? ​

readonly optional default?: string | number | boolean

Defined in: graphty-element/src/session/styles/channels.ts:341

The value the element draws when no layer sets the channel: the element's own default style where it states one, and otherwise what the renderer draws for an unset value. A colour is #RRGGBB. Absent when an unset channel draws nothing at all -- no label, no outline, no glow -- or when the renderer decides per element, as the pattern count does. An arrow cap's colour is the one channel that leans on another: unset, a cap is drawn in its line's colour, so its default is the line's default and a layer that sets edge.color moves it too.


group ​

readonly group: ChannelGroup

Defined in: graphty-element/src/session/styles/channels.ts:331

Which group of a style editor the channel sits in.


max? ​

readonly optional max?: number

Defined in: graphty-element/src/session/styles/channels.ts:349

The largest value the renderer draws, when accepts is "number" and it is bounded.


min? ​

readonly optional min?: number

Defined in: graphty-element/src/session/styles/channels.ts:347

The smallest value the renderer draws, when accepts is "number".


plainName ​

readonly plainName: string

Defined in: graphty-element/src/session/styles/channels.ts:323

The name a person reads.


renderable ​

readonly renderable: boolean

Defined in: graphty-element/src/session/styles/channels.ts:353

Whether the element draws this channel at all today.


shortName ​

readonly shortName: string

Defined in: graphty-element/src/session/styles/channels.ts:329

The name a person reads once the target is already said, in sentence case: "Marker" where plainName is "Node Marker". What a style editor writes beside the control, in a panel that already says it is styling nodes.


stylePath ​

readonly stylePath: string

Defined in: graphty-element/src/session/styles/channels.ts:351

Where the value lands in a parsed node or edge style, as a dotted path.


target ​

readonly target: "node" | "edge"

Defined in: graphty-element/src/session/styles/channels.ts:321

Whether it paints nodes or edges.


unsupportedReason? ​

readonly optional unsupportedReason?: string

Defined in: graphty-element/src/session/styles/channels.ts:364

Why the channel cannot be set, as a sentence for a reader beside a disabled control. Present exactly when renderable is false; caveat is the longer note for an implementer. The same field name as OptionDescriptor.unsupportedReason.


values? ​

readonly optional values?: readonly string[]

Defined in: graphty-element/src/session/styles/channels.ts:345

Every value it accepts, when accepts is "enum".