Skip to content

@graphty/graph-io / styles / ToolDerivedDefault

Type Alias: ToolDerivedDefault ​

ToolDerivedDefault = { column: string; kind: "labelFromColumn"; source: string; } | { kind: "labelFromId"; source: string; } | { kind: "colorFromSourceNode"; source: string; } | { kind: "colorFromEndNodes"; source: string; } | { kind: "widthFromWeight"; source: string; } | { arrow: StyleArrowShape; kind: "targetArrowOnDirected"; source: string; }

Defined in: styles/defaults.ts:30

A default that is a rule rather than a constant. Open union.

Union Members ​

Type Literal ​

{ column: string; kind: "labelFromColumn"; source: string; }

column ​

readonly column: string

The column.

kind ​

readonly kind: "labelFromColumn"

Nodes are labeled with the value of a column (Cytoscape's name passthrough).

source ​

readonly source: string

Where the default is stated.


Type Literal ​

{ kind: "labelFromId"; source: string; }

kind ​

readonly kind: "labelFromId"

Nodes are labeled with their id (Graphviz's \N).

source ​

readonly source: string

Where the default is stated.


Type Literal ​

{ kind: "colorFromSourceNode"; source: string; }

kind ​

readonly kind: "colorFromSourceNode"

An edge with no color of its own takes its source node's color.

source ​

readonly source: string

Where the default is stated.


Type Literal ​

{ kind: "colorFromEndNodes"; source: string; }

kind ​

readonly kind: "colorFromEndNodes"

An edge with no color of its own takes the mix of its two end nodes' colors (Gephi's EdgeColor MIXED).

source ​

readonly source: string

Where the default is stated.


Type Literal ​

{ kind: "widthFromWeight"; source: string; }

kind ​

readonly kind: "widthFromWeight"

An edge with no width of its own is drawn as thick as its weight (1 for an edge with no weight, or a weight of 0 or below).

source ​

readonly source: string

Where the default is stated.


Type Literal ​

{ arrow: StyleArrowShape; kind: "targetArrowOnDirected"; source: string; }

arrow ​

readonly arrow: StyleArrowShape

The arrow.

kind ​

readonly kind: "targetArrowOnDirected"

A directed edge gets an arrow at its target end; an undirected edge keeps the constant default.

source ​

readonly source: string

Where the default is stated.