Skip to content

@graphty/graph-io / styles / ExporterStyleInput

Interface: ExporterStyleInput ​

Defined in: styles/io/writer.ts:31

What an exporter with a styles member receives as options.styles when styles are being written.

Properties ​

block ​

readonly block: string

Defined in: styles/io/writer.ts:41

The graphty.styles block (JSON text) to place where the format keeps extra data.


rules ​

readonly rules: ExtractedStyles

Defined in: styles/io/writer.ts:50

The styles themselves, for a format with a style language of its own.


tags ​

readonly tags: object

Defined in: styles/io/writer.ts:43

The per-element style values the block's rules read, by attribute name (graphty.style.<target>.<key>).

edge ​

readonly edge: ReadonlyMap<string, StyleColumn>

Edge values.

node ​

readonly node: ReadonlyMap<string, StyleColumn>

Node values.

Methods ​

picture() ​

picture(target, property): readonly (StyleValue | null)[]

Defined in: styles/io/writer.ts:39

Each element's value of one property, by element index (null where no rule gives one): what graphty draws, to write into the format's own style slots.

Parameters ​

target ​

StyleTarget

nodes or edges

property ​

StyleProperty

the property

Returns ​

readonly (StyleValue | null)[]

the values