Skip to content

@graphty/graph-io / styles / TextAnnotation

Interface: TextAnnotation ​

Defined in: styles/annotations.ts:76

A line of text.

Extends ​

Properties ​

anchor ​

readonly anchor: "center" | "top-left"

Defined in: styles/annotations.ts:84

What at is.


at ​

readonly at: AnnotationPoint

Defined in: styles/annotations.ts:82

Where the text is placed: the top-left corner of its box, or its center.


bold ​

readonly bold: boolean

Defined in: styles/annotations.ts:90

Whether the text is bold.


color ​

readonly color: `#${string}`

Defined in: styles/annotations.ts:94

The text color.


fontFamily ​

readonly fontFamily: string

Defined in: styles/annotations.ts:88

The font family.


fontSize ​

readonly fontSize: number

Defined in: styles/annotations.ts:86

The font size, in the file's units.


id ​

readonly id: string

Defined in: styles/annotations.ts:29

The file's id for the annotation, or its index when the file gives none.

Inherited from ​

AnnotationBase.id


italic ​

readonly italic: boolean

Defined in: styles/annotations.ts:92

Whether the text is italic.


kind ​

readonly kind: "text"

Defined in: styles/annotations.ts:78

What the annotation is: always "text" for a line of text.


layer ​

readonly layer: "background" | "foreground"

Defined in: styles/annotations.ts:31

Whether it is drawn behind the graph or in front of it.

Inherited from ​

AnnotationBase.layer


opacity ​

readonly opacity: number

Defined in: styles/annotations.ts:96

The text's opacity, 0..1.


rotation ​

readonly rotation: number

Defined in: styles/annotations.ts:42

The turn in degrees, clockwise on screen.

Inherited from ​

RotatedAnnotation.rotation


text ​

readonly text: string

Defined in: styles/annotations.ts:80

The text.


z ​

readonly z: number

Defined in: styles/annotations.ts:33

Its drawing order within its layer, lowest first.

Inherited from ​

AnnotationBase.z