SheetXL - v1.0.2
    Preparing search index...

    Interface IDataLabels

    The labels of a series' points.

    interface IDataLabels {
        isIDataLabels: true;
        getChart(): IChart;
        getElementType(): IChart.ElementType;
        getLinkNumberFormat(): boolean;
        getNumberFormat(): string | null;
        getParent(): IElement | null;
        getPath(): string;
        getPosition(): DataLabelPosition;
        getSeparator(): string;
        getShowBubbleSize(): boolean;
        getShowCategoryName(): boolean;
        getShowLegendKey(): boolean;
        getShowPercentage(): boolean;
        getShowSeriesName(): boolean;
        getShowValue(): boolean;
        getStyle(): ITextBoxStyle;
        getTextOrientation(): number | "vertical";
        getValueFromCellsFormula(): string | null;
        getVisible(): boolean;
        setLinkNumberFormat(
            linked: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setNumberFormat(
            formatCode: string | null,
            options?: ITransaction.OperationOptions,
        ): this;
        setPosition(
            position: DataLabelPosition,
            options?: ITransaction.OperationOptions,
        ): this;
        setSeparator(
            separator: string,
            options?: ITransaction.OperationOptions,
        ): this;
        setShowBubbleSize(
            show: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setShowCategoryName(
            show: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setShowLegendKey(
            show: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setShowPercentage(
            show: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setShowSeriesName(
            show: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setShowValue(show: boolean, options?: ITransaction.OperationOptions): this;
        setTextOrientation(
            orientation: number | "vertical",
            options?: ITransaction.OperationOptions,
        ): this;
        setValueFromCells(
            source: string | ICellRange | null,
            options?: ITransaction.OperationOptions,
        ): this;
        setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
        update(
            update: IChart.IDataLabels.Update,
            options?: ITransaction.OperationOptions,
        ): this;
    }

    Hierarchy (View Summary)

    Index
    isIDataLabels: true

    For runtime type checking.

    • Returns whether the labels take the values' number format.

      Returns boolean

    • Returns the labels' number format, or null when they take the values'.

      Returns string | null

    • Returns the element this one is part of: a point's series, a gridline's axis, a legend entry's legend. The parts at the top (the title, the legend, the plot area, an axis, a series, a group) are the chart area's; the chart area has none.

      Returns IElement | null

    • Returns where the element is in its chart, as IChart.getElement takes it.

      Returns string

      A path is its parts' names joined by /, and does not change while the part is there:

      • chartArea, title, legend, legend/entries/<n>, plotArea, dataTable, and dataLabels (every series' at once);
      • axes/<primary|secondary>/<category|value|series>, and an axis's …/title, …/majorGridlines and …/minorGridlines;
      • series/<key>, and a series' …/marker, …/dataLabels, …/errorBars/<x|y>, …/trendlines/<n>, …/trendlines/<n>/label, …/points/<n>, …/points/<n>/marker and …/points/<n>/dataLabel;
      • groups/<n>, and a group's …/upDownBars, …/hiLoLines, …/dropLines and …/seriesLines.

      A series' key is its index in the file (c:idx), which an edit does not change; its place in the plot order can change. A point, a trendline, a legend entry and a group are named by their place, from 0: when one before it is removed, the path names the one that took its place.

    • Returns where the labels sit: the one set, or the type's own (outside the end of a clustered bar, the center of a stacked bar or an area, right of a line's or a scatter's point).

      Returns DataLabelPosition

    • Returns what separates the parts of a label.

      Returns string

    • Returns whether a bubble's label shows its size.

      Returns boolean

    • Returns whether a label shows its point's category.

      Returns boolean

    • Returns whether each label shows the series' legend key.

      Returns boolean

    • Returns whether a label shows its point's share of the whole.

      Returns boolean

    • Returns whether a label shows the series' name.

      Returns boolean

    • Returns whether a label shows its point's value.

      Returns boolean

    • Returns the labels' angle in degrees counterclockwise, or 'vertical' for stacked letters.

      Returns number | "vertical"

    • Returns the formula of the cells the labels show (Excel's "Value From Cells"), or null.

      Returns string | null

    • Returns whether the series' points are labeled.

      Returns boolean

    • Sets whether a bubble's label shows its size.

      Parameters

      Returns this

      ExpectedError on a series that is not a bubble's, as Excel refuses it.

    • Sets whether a label shows its point's share of the whole.

      Parameters

      Returns this

      ExpectedError for a series that is not a pie or doughnut, as in Excel.

    • Turns the labels: degrees from -90 to 90 counterclockwise, or 'vertical'.

      Parameters

      Returns this