SheetXL - v1.0.2
    Preparing search index...

    Interface ITextBoxStyle

    What a text box draws with: its fill, its line and the font of its text.

    A chart's title, legend, axes, data labels and data table are text boxes: one getStyle() answers how each looks, as range.getStyle() does for a cell. A part with no text, such as a series or the plot area, answers an IShapeStyle; isITextBoxStyle tells them apart.

    The font reads what is drawn, stated or not; what the box does not state it takes from the text around it. toJSON answers only what the box states.

    const style = chart.getTitle().getStyle();
    style.getFont().setBold(true);
    style.update({ fill: 'white', font: { size: 18, color: 'accent1' } });
    style.clear(); // fill, line and font back to the chart's
    interface ITextBoxStyle {
        isIShapeStyle: true;
        isITextBoxStyle: true;
        clear(options?: ITransaction.OperationOptions): ITextBoxStyle;
        getFill(): INone | ISolid | IGradient | IPattern | IImage;
        getFont(): IFontStyle;
        getStroke(): IStroke;
        isThemed(): boolean;
        setFill(
            fill: IFill.Update,
            options?: ITransaction.OperationOptions,
        ): ITextBoxStyle;
        setFillGradient(options?: ITransaction.OperationOptions): IGradient;
        setFillNone(options?: ITransaction.OperationOptions): INone;
        setFillPattern(options?: ITransaction.OperationOptions): IPattern;
        setFillSolid(options?: ITransaction.OperationOptions): ISolid;
        setStroke(
            stroke: IStroke.Update,
            options?: ITransaction.OperationOptions,
        ): ITextBoxStyle;
        setStrokeNone(options?: ITransaction.OperationOptions): IStroke;
        toJSON(): ITextBoxStyle.JSON | null;
        update(
            update: ITextBoxStyle.Update,
            options?: ITransaction.OperationOptions,
        ): ITextBoxStyle;
    }

    Hierarchy (View Summary)

    Index
    isIShapeStyle: true

    For type checking.

    isITextBoxStyle: true

    For type checking.

    • The line, resolved. A shape that states none draws its theme style's; a line the shape states without a color takes the theme style's color, as in Excel.

      Returns IStroke

    • Whether the shape states nothing of its own: it draws with its theme style alone.

      Returns boolean