Skip to content
EliteChart

TextState

Documentation


Documentation / @elitechart/drawings / TextState

Defined in: drawings/src/text.ts:23

Properties

anchor

code
readonly anchor: DataPoint;

Defined in: drawings/src/text.ts:24


backgroundColor?

code
readonly optional backgroundColor?: string;

Defined in: drawings/src/text.ts:39

Background fill behind the text. undefined or 'transparent' = no background. Any CSS color string otherwise. Default undefined (transparent).


backgroundPadding?

code
readonly optional backgroundPadding?: number;

Defined in: drawings/src/text.ts:41

Padding around text inside the bg rect in CSS pixels. Default 4.


color?

code
readonly optional color?: string;

Defined in: drawings/src/text.ts:27

Optional stroke override; defaults to style.textColor.


fontSize?

code
readonly optional fontSize?: number;

Defined in: drawings/src/text.ts:29

Font size in CSS pixels. Default 12.


fontStyle?

code
readonly optional fontStyle?: "normal" | "italic";

Defined in: drawings/src/text.ts:33

Font style. Default 'normal'.


fontWeight?

code
readonly optional fontWeight?: "normal" | "bold";

Defined in: drawings/src/text.ts:31

Font weight. Default 'normal'.


text

code
readonly text: string;

Defined in: drawings/src/text.ts:25