SheetXL - v1.0.2
    Preparing search index...

    Interface IAxis

    One axis of a chart.

    interface IAxis {
        isIAxis: true;
        getAxisGroup(): AxisGroup;
        getBaseTimeUnit(): AxisTimeUnit | null;
        getCategoryType(): AxisCategoryType;
        getChart(): IChart;
        getCrosses(): AxisCrosses;
        getCrossesAt(): number | null;
        getCustomDisplayUnit(): number;
        getDisplayUnit(): AxisDisplayUnit;
        getElementType(): IChart.ElementType;
        getKind(): "value" | "category" | "date" | "series";
        getLinkNumberFormat(): boolean;
        getLogBase(): number;
        getMajorGridlines(): IGridlines;
        getMajorTickMark(): AxisTickMark;
        getMajorTimeUnitScale(): AxisTimeUnit | null;
        getMajorUnit(): number | null;
        getMaximum(): number | null;
        getMinimum(): number | null;
        getMinorGridlines(): IGridlines;
        getMinorTickMark(): AxisTickMark;
        getMinorTimeUnitScale(): AxisTimeUnit | null;
        getMinorUnit(): number | null;
        getMultiLevel(): boolean;
        getNumberFormat(): string | null;
        getParent(): IElement | null;
        getPath(): string;
        getReversePlotOrder(): boolean;
        getScaleType(): AxisScaleType;
        getShowDisplayUnitLabel(): boolean;
        getStyle(): ITextBoxStyle;
        getTextOrientation(): number | "auto" | "vertical";
        getTickLabelPosition(): AxisTickLabelPosition;
        getTickLabelSpacing(): number | null;
        getTickMarkSpacing(): number | null;
        getTitle(): IChart.IAxisTitle;
        getVisible(): boolean;
        isMajorUnitAuto(): boolean;
        isMaximumAuto(): boolean;
        isMinimumAuto(): boolean;
        isMinorUnitAuto(): boolean;
        setBaseTimeUnit(
            unit: "auto" | AxisTimeUnit,
            options?: ITransaction.OperationOptions,
        ): this;
        setCategoryNames(
            source: string | ICellRange,
            options?: ITransaction.OperationOptions,
        ): this;
        setCategoryType(
            type: AxisCategoryType,
            options?: ITransaction.OperationOptions,
        ): this;
        setCrosses(
            crosses: AxisCrosses,
            options?: ITransaction.OperationOptions,
        ): this;
        setCrossesAt(value: number, options?: ITransaction.OperationOptions): this;
        setCustomDisplayUnit(
            unit: number,
            options?: ITransaction.OperationOptions,
        ): this;
        setDisplayUnit(
            unit: AxisDisplayUnit,
            options?: ITransaction.OperationOptions,
        ): this;
        setLinkNumberFormat(
            linked: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setLogBase(logBase: number, options?: ITransaction.OperationOptions): this;
        setMajorTickMark(
            mark: AxisTickMark,
            options?: ITransaction.OperationOptions,
        ): this;
        setMajorTimeUnitScale(
            unit: AxisTimeUnit,
            options?: ITransaction.OperationOptions,
        ): this;
        setMajorUnit(
            value: number | "auto",
            options?: ITransaction.OperationOptions,
        ): this;
        setMaximum(
            value: number | "auto",
            options?: ITransaction.OperationOptions,
        ): this;
        setMinimum(
            value: number | "auto",
            options?: ITransaction.OperationOptions,
        ): this;
        setMinorTickMark(
            mark: AxisTickMark,
            options?: ITransaction.OperationOptions,
        ): this;
        setMinorTimeUnitScale(
            unit: AxisTimeUnit,
            options?: ITransaction.OperationOptions,
        ): this;
        setMinorUnit(
            value: number | "auto",
            options?: ITransaction.OperationOptions,
        ): this;
        setMultiLevel(
            multiLevel: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setNumberFormat(
            formatCode: string,
            options?: ITransaction.OperationOptions,
        ): this;
        setReversePlotOrder(
            reverse: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setScaleType(
            scaleType: AxisScaleType,
            options?: ITransaction.OperationOptions,
        ): this;
        setShowDisplayUnitLabel(
            show: boolean,
            options?: ITransaction.OperationOptions,
        ): this;
        setTextOrientation(
            orientation: number | "auto" | "vertical",
            options?: ITransaction.OperationOptions,
        ): this;
        setTickLabelPosition(
            position: AxisTickLabelPosition,
            options?: ITransaction.OperationOptions,
        ): this;
        setTickLabelSpacing(
            spacing: number | null,
            options?: ITransaction.OperationOptions,
        ): this;
        setTickMarkSpacing(
            spacing: number | null,
            options?: ITransaction.OperationOptions,
        ): this;
        setVisible(visible: boolean, options?: ITransaction.OperationOptions): this;
        update(
            update: IChart.IAxis.Update,
            options?: ITransaction.OperationOptions,
        ): this;
    }

    Hierarchy (View Summary)

    Index
    isIAxis: true

    For runtime type checking.

    • Returns a date axis's base unit: what one category spans. null for another axis.

      Returns AxisTimeUnit | null

    • Returns where the crossing axis crosses this one: automatically (at zero), at this axis's maximum or minimum, or at a value (getCrossesAt).

      Returns AxisCrosses

    • Returns the value the crossing axis crosses this one at, when one is set; else null.

      Returns number | null

    • Returns the divisor of a custom display unit, or the built-in unit's; 1 for none.

      Returns number

    • Returns what the axis measures: categories, values, dates, or — on a surface or 3-D chart — the series themselves.

      Returns "value" | "category" | "date" | "series"

    • Returns whether the labels take the number format of the cells the chart plots.

      Returns boolean

    • Returns a logarithmic axis's base; 10 for a linear axis.

      Returns number

    • Returns the lines across the plot area at the axis's labeled ticks.

      Returns IGridlines

    • Returns the unit of a date axis's major unit, or null for another axis.

      Returns AxisTimeUnit | null

    • Returns the interval between the axis's labeled ticks: the one set, or the one the chart chose.

      Returns number | null

    • Returns the greatest value the axis shows: the one set, or the one the chart chose.

      Returns number | null

    • Returns the least value the axis shows: the one set, or the one the chart chose. null for an axis of categories that states none.

      Returns number | null

      An automatic value is the one the chart is drawn with at its size, as Excel's MinimumScale reads.

    • Returns the lines across the plot area between the labeled ticks.

      Returns IGridlines

    • Returns the unit of a date axis's minor unit, or null for another axis.

      Returns AxisTimeUnit | null

    • Returns the interval between the axis's minor ticks: the one set, or the one the chart chose (a fifth of the major unit, by belief). null for an axis of categories.

      Returns number | null

    • Returns whether the axis draws categories two or more levels deep a level at a time, each outer label spanning its group. false for an axis of values or dates.

      Returns boolean

      true by default, and on an axis whose categories have one level, where it changes nothing drawn. Off, each category has one label of all its levels.

    • Returns the number format of the axis labels, or null if the axis states none.

      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 whether the axis runs from its maximum to its minimum.

      Returns boolean

    • Returns whether the display unit's label is shown beside the axis.

      Returns boolean

    • Returns the labels' angle in degrees counterclockwise (90 reads up), 'vertical' for stacked letters, or 'auto' for Excel's own.

      Returns number | "auto" | "vertical"

    • Returns how many categories apart the labels are, or null when the chart chooses.

      Returns number | null

    • Returns how many categories apart the tick marks are, or null when the chart chooses.

      Returns number | null

    • Returns the axis's title: its text, font, fill and orientation. An axis always has one to set, shown or not.

      Returns IChart.IAxisTitle

      Often the only place the units of a chart are stated. A formula (=Sheet1!$B$1) as its text shows a cell's text.

      axis.getTitle().getText();        // 'Units', or null
      axis.getTitle().setText('Units');
    • Returns whether the axis is shown. A hidden axis still scales its series.

      Returns boolean

    • Returns whether the chart chooses the interval between labeled ticks.

      Returns boolean

    • Returns whether the chart chooses the greatest value.

      Returns boolean

    • Returns whether the chart chooses the least value.

      Returns boolean

    • Returns whether the chart chooses the minor unit.

      Returns boolean

    • Sets the categories of every series plotted on the axis: a range, an address, a defined name, or an array constant ({"Q1","Q2"}). A range two or more columns deep gives categories that many levels deep. Categories that are all dates make the axis a date axis, unless its type was set.

      Parameters

      Returns this

      ExpectedError for an axis of values.

    • Sets the base of a logarithmic axis, making it one.

      Parameters

      Returns this

      ExpectedError for a base of 2 or less, or on an axis of categories.

    • Sets the interval between minor ticks, or 'auto' to let the chart choose.

      Parameters

      Returns this

      ExpectedError on an axis of categories.

    • Sets whether the axis draws categories two or more levels deep a level at a time. An axis of dates keeps no such setting, and is left as it is.

      Parameters

      Returns this

      ExpectedError for an axis of values.

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

      Parameters

      Returns this

    • Labels every n-th category; null lets the chart choose.

      Parameters

      Returns this

      ExpectedError off an axis of categories.