ExcelScript.ChartAxis interface
Represents a single axis in a chart.
Methods
get |
Specifies the alignment for the specified axis tick label. See |
get |
Specifies the group for the specified axis. See |
get |
Specifies the base unit for the specified category axis. |
get |
Specifies the category axis type. |
get |
Specifies the custom axis display unit value. To set this property, please use the |
get |
Represents the axis display unit. See |
get |
Represents the formatting of a chart object, which includes line and font formatting. |
get |
Specifies the height, in points, of the chart axis. Returns |
get |
Specifies if the value axis crosses the category axis between categories. |
get |
Specifies the distance, in points, from the left edge of the axis to the left of chart area. Returns |
get |
Specifies if the number format is linked to the cells. If |
get |
Specifies the base of the logarithm when using logarithmic scales. |
get |
Returns an object that represents the major gridlines for the specified axis. |
get |
Specifies the type of major tick mark for the specified axis. See |
get |
Specifies the major unit scale value for the category axis when the |
get |
Specifies the interval between two major tick marks. |
get |
Specifies the maximum value on the value axis. |
get |
Specifies the minimum value on the value axis. |
get |
Returns an object that represents the minor gridlines for the specified axis. |
get |
Specifies the type of minor tick mark for the specified axis. See |
get |
Specifies the minor unit scale value for the category axis when the |
get |
Specifies the interval between two minor tick marks. |
get |
Specifies if an axis is multilevel. |
get |
Specifies the format code for the axis tick label. |
get |
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. |
get |
Specifies the specified axis position where the other axis crosses. See |
get |
Specifies the axis position where the other axis crosses. You should use the |
get |
Specifies if Excel plots data points from last to first. |
get |
Specifies the value axis scale type. See |
get |
Specifies if the axis display unit label is visible. |
get |
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. |
get |
Specifies the position of tick-mark labels on the specified axis. See |
get |
Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999. |
get |
Specifies the number of categories or series between tick marks. |
get |
Represents the axis title. |
get |
Specifies the distance, in points, from the top edge of the axis to the top of chart area. Returns |
get |
Specifies the axis type. See |
get |
Specifies if the axis is visible. |
get |
Specifies the width, in points, of the chart axis. Returns |
set |
Specifies the alignment for the specified axis tick label. See |
set |
Specifies the base unit for the specified category axis. |
set |
Sets all the category names for the specified axis. |
set |
Specifies the category axis type. |
set |
Sets the axis display unit to a custom value. |
set |
Represents the axis display unit. See |
set |
Specifies if the value axis crosses the category axis between categories. |
set |
Specifies if the number format is linked to the cells. If |
set |
Specifies the base of the logarithm when using logarithmic scales. |
set |
Specifies the type of major tick mark for the specified axis. See |
set |
Specifies the major unit scale value for the category axis when the |
set |
Specifies the interval between two major tick marks. |
set |
Specifies the maximum value on the value axis. |
set |
Specifies the minimum value on the value axis. |
set |
Specifies the type of minor tick mark for the specified axis. See |
set |
Specifies the minor unit scale value for the category axis when the |
set |
Specifies the interval between two minor tick marks. |
set |
Specifies if an axis is multilevel. |
set |
Specifies the format code for the axis tick label. |
set |
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. |
set |
Specifies the specified axis position where the other axis crosses. See |
set |
Sets the specified axis position where the other axis crosses. |
set |
Specifies if Excel plots data points from last to first. |
set |
Specifies the value axis scale type. See |
set |
Specifies if the axis display unit label is visible. |
set |
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. |
set |
Specifies the position of tick-mark labels on the specified axis. See |
set |
Specifies the number of categories or series between tick-mark labels. Can be a value from 1 through 31999. |
set |
Specifies the number of categories or series between tick marks. |
set |
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()
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
- alignment
- ExcelScript.ChartTickLabelAlignment
Returns
void
setBaseTimeUnit(baseTimeUnit)
Specifies the base unit for the specified category axis.
setBaseTimeUnit(baseTimeUnit: ChartAxisTimeUnit): void;
Parameters
- baseTimeUnit
- ExcelScript.ChartAxisTimeUnit
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
- categoryType
- ExcelScript.ChartAxisCategoryType
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
- displayUnit
- ExcelScript.ChartAxisDisplayUnit
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
- majorTickMark
- ExcelScript.ChartAxisTickMark
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
- minorTickMark
- ExcelScript.ChartAxisTickMark
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
- position
- ExcelScript.ChartAxisPosition
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
- scaleType
- ExcelScript.ChartAxisScaleType
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
- tickLabelPosition
- ExcelScript.ChartAxisTickLabelPosition
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
Office Scripts