ExcelScript.ChartAxis interface

Represents a single axis in a chart.

Methods

getAlignment()

Specifies the alignment for the specified axis tick label. See ExcelScript.ChartTextHorizontalAlignment for detail.

getAxisGroup()

Specifies the group for the specified axis. See ExcelScript.ChartAxisGroup for details.

getBaseTimeUnit()

Specifies the base unit for the specified category axis.

getCategoryType()

Specifies the category axis type.

getCustomDisplayUnit()

Specifies the custom axis display unit value. To set this property, please use the SetCustomDisplayUnit(double) method.

getDisplayUnit()

Represents the axis display unit. See ExcelScript.ChartAxisDisplayUnit for details.

getFormat()

Represents the formatting of a chart object, which includes line and font formatting.

getHeight()

Specifies the height, in points, of the chart axis. Returns null if the axis is not visible.

getIsBetweenCategories()

Specifies if the value axis crosses the category axis between categories.

getLeft()

Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns null if the axis is not visible.

getLinkNumberFormat()

Specifies if the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells.

getLogBase()

Specifies the base of the logarithm when using logarithmic scales.

getMajorGridlines()

Returns an object that represents the major gridlines for the specified axis.

getMajorTickMark()

Specifies the type of major tick mark for the specified axis. See ExcelScript.ChartAxisTickMark for details.

getMajorTimeUnitScale()

Specifies the major unit scale value for the category axis when the categoryType property is set to dateAxis.

getMajorUnit()

Specifies the interval between two major tick marks.

getMaximum()

Specifies the maximum value on the value axis.

getMinimum()

Specifies the minimum value on the value axis.

getMinorGridlines()

Returns an object that represents the minor gridlines for the specified axis.

getMinorTickMark()

Specifies the type of minor tick mark for the specified axis. See ExcelScript.ChartAxisTickMark for details.

getMinorTimeUnitScale()

Specifies the minor unit scale value for the category axis when the categoryType property is set to dateAxis.

getMinorUnit()

Specifies the interval between two minor tick marks.

getMultiLevel()

Specifies if an axis is multilevel.

getNumberFormat()

Specifies the format code for the axis tick label.

getOffset()

Specifies the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000.

getPosition()

Specifies the specified axis position where the other axis crosses. See ExcelScript.ChartAxisPosition for details.

getPositionAt()

Specifies the axis position where the other axis crosses. You should use the SetPositionAt(double) method to set this property.

getReversePlotOrder()

Specifies if Excel plots data points from last to first.

getScaleType()

Specifies the value axis scale type. See ExcelScript.ChartAxisScaleType for details.

getShowDisplayUnitLabel()

Specifies if the axis display unit label is visible.

getTextOrientation()

Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text.

getTickLabelPosition()

Specifies the position of tick-mark labels on the specified axis. See ExcelScript.ChartAxisTickLabelPosition for details.

getTickLabelSpacing()

Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999.

getTickMarkSpacing()

Specifies the number of categories or series between tick marks.

getTitle()

Represents the axis title.

getTop()

Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns null if the axis is not visible.

getType()

Specifies the axis type. See ExcelScript.ChartAxisType for details.

getVisible()

Specifies if the axis is visible.

getWidth()

Specifies the width, in points, of the chart axis. Returns null if the axis is not visible.

setAlignment(alignment)

Specifies the alignment for the specified axis tick label. See ExcelScript.ChartTextHorizontalAlignment for detail.

setBaseTimeUnit(baseTimeUnit)

Specifies the base unit for the specified category axis.

setCategoryNames(sourceData)

Sets all the category names for the specified axis.

setCategoryType(categoryType)

Specifies the category axis type.

setCustomDisplayUnit(value)

Sets the axis display unit to a custom value.

setDisplayUnit(displayUnit)

Represents the axis display unit. See ExcelScript.ChartAxisDisplayUnit for details.

setIsBetweenCategories(isBetweenCategories)

Specifies if the value axis crosses the category axis between categories.

setLinkNumberFormat(linkNumberFormat)

Specifies if the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells.

setLogBase(logBase)

Specifies the base of the logarithm when using logarithmic scales.

setMajorTickMark(majorTickMark)

Specifies the type of major tick mark for the specified axis. See ExcelScript.ChartAxisTickMark for details.

setMajorTimeUnitScale(majorTimeUnitScale)

Specifies the major unit scale value for the category axis when the categoryType property is set to dateAxis.

setMajorUnit(majorUnit)

Specifies the interval between two major tick marks.

setMaximum(maximum)

Specifies the maximum value on the value axis.

setMinimum(minimum)

Specifies the minimum value on the value axis.

setMinorTickMark(minorTickMark)

Specifies the type of minor tick mark for the specified axis. See ExcelScript.ChartAxisTickMark for details.

setMinorTimeUnitScale(minorTimeUnitScale)

Specifies the minor unit scale value for the category axis when the categoryType property is set to dateAxis.

setMinorUnit(minorUnit)

Specifies the interval between two minor tick marks.

setMultiLevel(multiLevel)

Specifies if an axis is multilevel.

setNumberFormat(numberFormat)

Specifies the format code for the axis tick label.

setOffset(offset)

Specifies the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000.

setPosition(position)

Specifies the specified axis position where the other axis crosses. See ExcelScript.ChartAxisPosition for details.

setPositionAt(value)

Sets the specified axis position where the other axis crosses.

setReversePlotOrder(reversePlotOrder)

Specifies if Excel plots data points from last to first.

setScaleType(scaleType)

Specifies the value axis scale type. See ExcelScript.ChartAxisScaleType for details.

setShowDisplayUnitLabel(showDisplayUnitLabel)

Specifies if the axis display unit label is visible.

setTextOrientation(textOrientation)

Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text.

setTickLabelPosition(tickLabelPosition)

Specifies the position of tick-mark labels on the specified axis. See ExcelScript.ChartAxisTickLabelPosition for details.

setTickLabelSpacing(tickLabelSpacing)

Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999.

setTickMarkSpacing(tickMarkSpacing)

Specifies the number of categories or series between tick marks.

setVisible(visible)

Specifies if the axis is visible.

Method Details

getAlignment()

Specifies the alignment for the specified axis tick label. See ExcelScript.ChartTextHorizontalAlignment for detail.

getAlignment(): ChartTickLabelAlignment;

Returns

getAxisGroup()

Specifies the group for the specified axis. See ExcelScript.ChartAxisGroup for details.

getAxisGroup(): ChartAxisGroup;

Returns

getBaseTimeUnit()

Specifies the base unit for the specified category axis.

getBaseTimeUnit(): ChartAxisTimeUnit;

Returns

getCategoryType()

Specifies the category axis type.

getCategoryType(): ChartAxisCategoryType;

Returns

getCustomDisplayUnit()

Specifies the custom axis display unit value. To set this property, please use the SetCustomDisplayUnit(double) method.

getCustomDisplayUnit(): number;

Returns

number

getDisplayUnit()

Represents the axis display unit. See ExcelScript.ChartAxisDisplayUnit for details.

getDisplayUnit(): ChartAxisDisplayUnit;

Returns

getFormat()

Represents the formatting of a chart object, which includes line and font formatting.

getFormat(): ChartAxisFormat;

Returns

getHeight()

Specifies the height, in points, of the chart axis. Returns null if the axis is not visible.

getHeight(): number;

Returns

number

getIsBetweenCategories()

Specifies if the value axis crosses the category axis between categories.

getIsBetweenCategories(): boolean;

Returns

boolean

getLeft()

Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns null if the axis is not visible.

getLeft(): number;

Returns

number

getLinkNumberFormat()

Specifies if the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells.

getLinkNumberFormat(): boolean;

Returns

boolean

getLogBase()

Specifies the base of the logarithm when using logarithmic scales.

getLogBase(): number;

Returns

number

getMajorGridlines()

Returns an object that represents the major gridlines for the specified axis.

getMajorGridlines(): ChartGridlines;

Returns

getMajorTickMark()

Specifies the type of major tick mark for the specified axis. See ExcelScript.ChartAxisTickMark for details.

getMajorTickMark(): ChartAxisTickMark;

Returns

getMajorTimeUnitScale()

Specifies the major unit scale value for the category axis when the categoryType property is set to dateAxis.

getMajorTimeUnitScale(): ChartAxisTimeUnit;

Returns

getMajorUnit()

Specifies the interval between two major tick marks.

getMajorUnit(): number;

Returns

number

getMaximum()

Specifies the maximum value on the value axis.

getMaximum(): number;

Returns

number

getMinimum()

Specifies the minimum value on the value axis.

getMinimum(): number;

Returns

number

getMinorGridlines()

Returns an object that represents the minor gridlines for the specified axis.

getMinorGridlines(): ChartGridlines;

Returns

getMinorTickMark()

Specifies the type of minor tick mark for the specified axis. See ExcelScript.ChartAxisTickMark for details.

getMinorTickMark(): ChartAxisTickMark;

Returns

getMinorTimeUnitScale()

Specifies the minor unit scale value for the category axis when the categoryType property is set to dateAxis.

getMinorTimeUnitScale(): ChartAxisTimeUnit;

Returns

getMinorUnit()

Specifies the interval between two minor tick marks.

getMinorUnit(): number;

Returns

number

getMultiLevel()

Specifies if an axis is multilevel.

getMultiLevel(): boolean;

Returns

boolean

getNumberFormat()

Specifies the format code for the axis tick label.

getNumberFormat(): string;

Returns

string

getOffset()

Specifies the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000.

getOffset(): number;

Returns

number

getPosition()

Specifies the specified axis position where the other axis crosses. See ExcelScript.ChartAxisPosition for details.

getPosition(): ChartAxisPosition;

Returns

getPositionAt()

Specifies the axis position where the other axis crosses. You should use the SetPositionAt(double) method to set this property.

getPositionAt(): number;

Returns

number

getReversePlotOrder()

Specifies if Excel plots data points from last to first.

getReversePlotOrder(): boolean;

Returns

boolean

getScaleType()

Specifies the value axis scale type. See ExcelScript.ChartAxisScaleType for details.

getScaleType(): ChartAxisScaleType;

Returns

getShowDisplayUnitLabel()

Specifies if the axis display unit label is visible.

getShowDisplayUnitLabel(): boolean;

Returns

boolean

getTextOrientation()

Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text.

getTextOrientation(): number;

Returns

number

getTickLabelPosition()

Specifies the position of tick-mark labels on the specified axis. See ExcelScript.ChartAxisTickLabelPosition for details.

getTickLabelPosition(): ChartAxisTickLabelPosition;

Returns

getTickLabelSpacing()

Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999.

getTickLabelSpacing(): number;

Returns

number

getTickMarkSpacing()

Specifies the number of categories or series between tick marks.

getTickMarkSpacing(): number;

Returns

number

getTitle()

Represents the axis title.

getTitle(): ChartAxisTitle;

Returns

getTop()

Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns null if the axis is not visible.

getTop(): number;

Returns

number

getType()

Specifies the axis type. See ExcelScript.ChartAxisType for details.

getType(): ChartAxisType;

Returns

getVisible()

Specifies if the axis is visible.

getVisible(): boolean;

Returns

boolean

getWidth()

Specifies the width, in points, of the chart axis. Returns null if the axis is not visible.

getWidth(): number;

Returns

number

setAlignment(alignment)

Specifies the alignment for the specified axis tick label. See ExcelScript.ChartTextHorizontalAlignment for detail.

setAlignment(alignment: ChartTickLabelAlignment): void;

Parameters

Returns

void

setBaseTimeUnit(baseTimeUnit)

Specifies the base unit for the specified category axis.

setBaseTimeUnit(baseTimeUnit: ChartAxisTimeUnit): void;

Parameters

Returns

void

setCategoryNames(sourceData)

Sets all the category names for the specified axis.

setCategoryNames(sourceData: Range): void;

Parameters

sourceData
ExcelScript.Range

The Range object corresponding to the source data.

Returns

void

setCategoryType(categoryType)

Specifies the category axis type.

setCategoryType(categoryType: ChartAxisCategoryType): void;

Parameters

Returns

void

setCustomDisplayUnit(value)

Sets the axis display unit to a custom value.

setCustomDisplayUnit(value: number): void;

Parameters

value

number

Custom value of the display unit.

Returns

void

setDisplayUnit(displayUnit)

Represents the axis display unit. See ExcelScript.ChartAxisDisplayUnit for details.

setDisplayUnit(displayUnit: ChartAxisDisplayUnit): void;

Parameters

Returns

void

setIsBetweenCategories(isBetweenCategories)

Specifies if the value axis crosses the category axis between categories.

setIsBetweenCategories(isBetweenCategories: boolean): void;

Parameters

isBetweenCategories

boolean

Returns

void

setLinkNumberFormat(linkNumberFormat)

Specifies if the number format is linked to the cells. If true, the number format will change in the labels when it changes in the cells.

setLinkNumberFormat(linkNumberFormat: boolean): void;

Parameters

linkNumberFormat

boolean

Returns

void

setLogBase(logBase)

Specifies the base of the logarithm when using logarithmic scales.

setLogBase(logBase: number): void;

Parameters

logBase

number

Returns

void

setMajorTickMark(majorTickMark)

Specifies the type of major tick mark for the specified axis. See ExcelScript.ChartAxisTickMark for details.

setMajorTickMark(majorTickMark: ChartAxisTickMark): void;

Parameters

Returns

void

setMajorTimeUnitScale(majorTimeUnitScale)

Specifies the major unit scale value for the category axis when the categoryType property is set to dateAxis.

setMajorTimeUnitScale(majorTimeUnitScale: ChartAxisTimeUnit): void;

Parameters

majorTimeUnitScale
ExcelScript.ChartAxisTimeUnit

Returns

void

setMajorUnit(majorUnit)

Specifies the interval between two major tick marks.

setMajorUnit(majorUnit: number): void;

Parameters

majorUnit

number

Returns

void

setMaximum(maximum)

Specifies the maximum value on the value axis.

setMaximum(maximum: number): void;

Parameters

maximum

number

Returns

void

setMinimum(minimum)

Specifies the minimum value on the value axis.

setMinimum(minimum: number): void;

Parameters

minimum

number

Returns

void

setMinorTickMark(minorTickMark)

Specifies the type of minor tick mark for the specified axis. See ExcelScript.ChartAxisTickMark for details.

setMinorTickMark(minorTickMark: ChartAxisTickMark): void;

Parameters

Returns

void

setMinorTimeUnitScale(minorTimeUnitScale)

Specifies the minor unit scale value for the category axis when the categoryType property is set to dateAxis.

setMinorTimeUnitScale(minorTimeUnitScale: ChartAxisTimeUnit): void;

Parameters

minorTimeUnitScale
ExcelScript.ChartAxisTimeUnit

Returns

void

setMinorUnit(minorUnit)

Specifies the interval between two minor tick marks.

setMinorUnit(minorUnit: number): void;

Parameters

minorUnit

number

Returns

void

setMultiLevel(multiLevel)

Specifies if an axis is multilevel.

setMultiLevel(multiLevel: boolean): void;

Parameters

multiLevel

boolean

Returns

void

setNumberFormat(numberFormat)

Specifies the format code for the axis tick label.

setNumberFormat(numberFormat: string): void;

Parameters

numberFormat

string

Returns

void

setOffset(offset)

Specifies the distance between the levels of labels, and the distance between the first level and the axis line. The value should be an integer from 0 to 1000.

setOffset(offset: number): void;

Parameters

offset

number

Returns

void

setPosition(position)

Specifies the specified axis position where the other axis crosses. See ExcelScript.ChartAxisPosition for details.

setPosition(position: ChartAxisPosition): void;

Parameters

Returns

void

setPositionAt(value)

Sets the specified axis position where the other axis crosses.

setPositionAt(value: number): void;

Parameters

value

number

Custom value of the crossing point.

Returns

void

setReversePlotOrder(reversePlotOrder)

Specifies if Excel plots data points from last to first.

setReversePlotOrder(reversePlotOrder: boolean): void;

Parameters

reversePlotOrder

boolean

Returns

void

setScaleType(scaleType)

Specifies the value axis scale type. See ExcelScript.ChartAxisScaleType for details.

setScaleType(scaleType: ChartAxisScaleType): void;

Parameters

Returns

void

setShowDisplayUnitLabel(showDisplayUnitLabel)

Specifies if the axis display unit label is visible.

setShowDisplayUnitLabel(showDisplayUnitLabel: boolean): void;

Parameters

showDisplayUnitLabel

boolean

Returns

void

setTextOrientation(textOrientation)

Specifies the angle to which the text is oriented for the chart axis tick label. The value should either be an integer from -90 to 90 or the integer 180 for vertically-oriented text.

setTextOrientation(textOrientation: number): void;

Parameters

textOrientation

number

Returns

void

setTickLabelPosition(tickLabelPosition)

Specifies the position of tick-mark labels on the specified axis. See ExcelScript.ChartAxisTickLabelPosition for details.

setTickLabelPosition(
            tickLabelPosition: ChartAxisTickLabelPosition
        ): void;

Parameters

Returns

void

setTickLabelSpacing(tickLabelSpacing)

Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999.

setTickLabelSpacing(tickLabelSpacing: number): void;

Parameters

tickLabelSpacing

number

Returns

void

setTickMarkSpacing(tickMarkSpacing)

Specifies the number of categories or series between tick marks.

setTickMarkSpacing(tickMarkSpacing: number): void;

Parameters

tickMarkSpacing

number

Returns

void

setVisible(visible)

Specifies if the axis is visible.

setVisible(visible: boolean): void;

Parameters

visible

boolean

Returns

void