Represents the attributes for a text graphic.

TextGraphicAttr

interface TextGraphicAttr {
    baseFontSize: number;
    color: string;
    horizontal: "center" | "left" | "right";
    rotation: number;
    textContent: string;
    vertical:
        | "baseline"
        | "top"
        | "middle"
        | "bottom";
}

Properties

baseFontSize: number

The base font size for the text.

color: string

The color of the text in a string format (e.g., "#FFFFFF" for white).

horizontal: "center" | "left" | "right"

The horizontal alignment of the text.

rotation: number

The rotation angle of the text in degrees.

textContent: string

The text content of the graphic.

vertical:
    | "baseline"
    | "top"
    | "middle"
    | "bottom"

The vertical alignment of the text.