Axis

Axis class

Encapsulates the object that represents an axis of chart.

class Axis;

Methods

MethodDescription
getArea()Gets the Area.
isAutomaticMinValue()Indicates whether the min value is automatically assigned.
setIsAutomaticMinValue(boolean)Indicates whether the min value is automatically assigned.
isAutomaticMaxValue()Indicates whether the max value is automatically assigned.
setIsAutomaticMaxValue(boolean)Indicates whether the max value is automatically assigned.
isAutomaticMajorUnit()Indicates whether the major unit of the axis is automatically assigned.
setIsAutomaticMajorUnit(boolean)Indicates whether the major unit of the axis is automatically assigned.
getMajorUnit()Represents the major units for the axis.
setMajorUnit(number)Represents the major units for the axis.
isAutomaticMinorUnit()Indicates whether the minor unit of the axis is automatically assigned.
setIsAutomaticMinorUnit(boolean)Indicates whether the minor unit of the axis is automatically assigned.
getMinorUnit()Represents the minor units for the axis.
setMinorUnit(number)Represents the minor units for the axis.
getAxisLine()Gets the appearance of an Axis.
getMajorTickMark()Represents the type of major tick mark for the specified axis.
setMajorTickMark(TickMarkType)Represents the type of major tick mark for the specified axis.
getMinorTickMark()Represents the type of minor tick mark for the specified axis.
setMinorTickMark(TickMarkType)Represents the type of minor tick mark for the specified axis.
getTickLabelPosition()Represents the position of tick-mark labels on the specified axis.
setTickLabelPosition(TickLabelPositionType)Represents the position of tick-mark labels on the specified axis.
getCrossAt()Represents the point on the value axis where the category axis crosses it.
setCrossAt(number)Represents the point on the value axis where the category axis crosses it.
getCrossType()Represents the CrossType on the specified axis where the other axis crosses.
setCrossType(CrossType)Represents the CrossType on the specified axis where the other axis crosses.
getLogBase()Represents the logarithmic base. Default value is 10.Only applies for Excel2007.
setLogBase(number)Represents the logarithmic base. Default value is 10.Only applies for Excel2007.
isLogarithmic()Represents if the value axis scale type is logarithmic or not.
setIsLogarithmic(boolean)Represents if the value axis scale type is logarithmic or not.
isPlotOrderReversed()Represents if Microsoft Excel plots data points from last to first.
setIsPlotOrderReversed(boolean)Represents if Microsoft Excel plots data points from last to first.
getAxisBetweenCategories()Represents if the value axis crosses the category axis between categories.
setAxisBetweenCategories(boolean)Represents if the value axis crosses the category axis between categories.
getTickLabels()Returns a TickLabels object that represents the tick-mark labels for the specified axis.
getTickLabelSpacing()Represents the number of categories or series between tick-mark labels. Applies only to category and series axes.
setTickLabelSpacing(number)Represents the number of categories or series between tick-mark labels. Applies only to category and series axes.
isAutoTickLabelSpacing()Indicates whether the spacing of tick label is automatic
setIsAutoTickLabelSpacing(boolean)Indicates whether the spacing of tick label is automatic
getTickMarkSpacing()Returns or sets the number of categories or series between tick marks. Applies only to category and series axes.
setTickMarkSpacing(number)Returns or sets the number of categories or series between tick marks. Applies only to category and series axes.
getDisplayUnit()Represents the unit label for the specified axis.
setDisplayUnit(DisplayUnitType)Represents the unit label for the specified axis.
getCustomUnit()Specifies a custom value for the display unit.
setCustomUnit(number)Specifies a custom value for the display unit.
getDisplayUnitLabel()Represents a unit label on an axis in the specified chart. Unit labels are useful for charting large values— for example, in the millions or billions.
isDisplayUnitLabelShown()Represents if the display unit label is shown on the specified axis.
setIsDisplayUnitLabelShown(boolean)Represents if the display unit label is shown on the specified axis.
getTitle()Gets the axis’ title.
getCategoryType()Represents the category axis type.
setCategoryType(CategoryType)Represents the category axis type.
getBaseUnitScale()Represents the base unit scale for the category axis.
setBaseUnitScale(TimeUnit)Represents the base unit scale for the category axis.
getMajorUnitScale()Represents the major unit scale for the category axis.
setMajorUnitScale(TimeUnit)Represents the major unit scale for the category axis.
getMinorUnitScale()Represents the major unit scale for the category axis.
setMinorUnitScale(TimeUnit)Represents the major unit scale for the category axis.
isVisible()Represents if the axis is visible.
setIsVisible(boolean)Represents if the axis is visible.
getMajorGridLines()Represents major gridlines on a chart axis.
getMinorGridLines()Represents minor gridlines on a chart axis.
getHasMultiLevelLabels()Indicates whether the labels shall be shown as multi level.
setHasMultiLevelLabels(boolean)Indicates whether the labels shall be shown as multi level.
getBins()Represents bins on a chart(Histogram/Pareto) axis
getAxisTexts()Gets the labels of the axis after call Chart.Calculate() method.

getArea()

Gets the Area.

getArea() : Area;

Returns

Area

isAutomaticMinValue()

Indicates whether the min value is automatically assigned.

isAutomaticMinValue() : boolean;

setIsAutomaticMinValue(boolean)

Indicates whether the min value is automatically assigned.

setIsAutomaticMinValue(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isAutomaticMaxValue()

Indicates whether the max value is automatically assigned.

isAutomaticMaxValue() : boolean;

setIsAutomaticMaxValue(boolean)

Indicates whether the max value is automatically assigned.

setIsAutomaticMaxValue(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isAutomaticMajorUnit()

Indicates whether the major unit of the axis is automatically assigned.

isAutomaticMajorUnit() : boolean;

setIsAutomaticMajorUnit(boolean)

Indicates whether the major unit of the axis is automatically assigned.

setIsAutomaticMajorUnit(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getMajorUnit()

Represents the major units for the axis.

getMajorUnit() : number;

Remarks

The major units must be greater than zero.

setMajorUnit(number)

Represents the major units for the axis.

setMajorUnit(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The major units must be greater than zero.

isAutomaticMinorUnit()

Indicates whether the minor unit of the axis is automatically assigned.

isAutomaticMinorUnit() : boolean;

setIsAutomaticMinorUnit(boolean)

Indicates whether the minor unit of the axis is automatically assigned.

setIsAutomaticMinorUnit(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getMinorUnit()

Represents the minor units for the axis.

getMinorUnit() : number;

Remarks

The minor units must be greater than zero.

setMinorUnit(number)

Represents the minor units for the axis.

setMinorUnit(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The minor units must be greater than zero.

getAxisLine()

Gets the appearance of an Axis.

getAxisLine() : Line;

Returns

Line

getMajorTickMark()

Represents the type of major tick mark for the specified axis.

getMajorTickMark() : TickMarkType;

Returns

TickMarkType

setMajorTickMark(TickMarkType)

Represents the type of major tick mark for the specified axis.

setMajorTickMark(value: TickMarkType) : void;

Parameters:

ParameterTypeDescription
valueTickMarkTypeThe value to set.

getMinorTickMark()

Represents the type of minor tick mark for the specified axis.

getMinorTickMark() : TickMarkType;

Returns

TickMarkType

setMinorTickMark(TickMarkType)

Represents the type of minor tick mark for the specified axis.

setMinorTickMark(value: TickMarkType) : void;

Parameters:

ParameterTypeDescription
valueTickMarkTypeThe value to set.

getTickLabelPosition()

Represents the position of tick-mark labels on the specified axis.

getTickLabelPosition() : TickLabelPositionType;

Returns

TickLabelPositionType

setTickLabelPosition(TickLabelPositionType)

Represents the position of tick-mark labels on the specified axis.

setTickLabelPosition(value: TickLabelPositionType) : void;

Parameters:

ParameterTypeDescription
valueTickLabelPositionTypeThe value to set.

getCrossAt()

Represents the point on the value axis where the category axis crosses it.

getCrossAt() : number;

Remarks

The number should be a integer when it applies to category axis. And the value must be between 1 and 31999.

setCrossAt(number)

Represents the point on the value axis where the category axis crosses it.

setCrossAt(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The number should be a integer when it applies to category axis. And the value must be between 1 and 31999.

getCrossType()

Represents the CrossType on the specified axis where the other axis crosses.

getCrossType() : CrossType;

Returns

CrossType

setCrossType(CrossType)

Represents the CrossType on the specified axis where the other axis crosses.

setCrossType(value: CrossType) : void;

Parameters:

ParameterTypeDescription
valueCrossTypeThe value to set.

getLogBase()

Represents the logarithmic base. Default value is 10.Only applies for Excel2007.

getLogBase() : number;

setLogBase(number)

Represents the logarithmic base. Default value is 10.Only applies for Excel2007.

setLogBase(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

isLogarithmic()

Represents if the value axis scale type is logarithmic or not.

isLogarithmic() : boolean;

setIsLogarithmic(boolean)

Represents if the value axis scale type is logarithmic or not.

setIsLogarithmic(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isPlotOrderReversed()

Represents if Microsoft Excel plots data points from last to first.

isPlotOrderReversed() : boolean;

setIsPlotOrderReversed(boolean)

Represents if Microsoft Excel plots data points from last to first.

setIsPlotOrderReversed(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getAxisBetweenCategories()

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

getAxisBetweenCategories() : boolean;

Remarks

This property applies only to category axes, and it doesn’t apply to 3-D charts.

setAxisBetweenCategories(boolean)

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

setAxisBetweenCategories(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

This property applies only to category axes, and it doesn’t apply to 3-D charts.

getTickLabels()

Returns a TickLabels object that represents the tick-mark labels for the specified axis.

getTickLabels() : TickLabels;

Returns

TickLabels

getTickLabelSpacing()

Represents the number of categories or series between tick-mark labels. Applies only to category and series axes.

getTickLabelSpacing() : number;

Remarks

The number must be between 1 and 31999.

setTickLabelSpacing(number)

Represents the number of categories or series between tick-mark labels. Applies only to category and series axes.

setTickLabelSpacing(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The number must be between 1 and 31999.

isAutoTickLabelSpacing()

Indicates whether the spacing of tick label is automatic

isAutoTickLabelSpacing() : boolean;

setIsAutoTickLabelSpacing(boolean)

Indicates whether the spacing of tick label is automatic

setIsAutoTickLabelSpacing(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getTickMarkSpacing()

Returns or sets the number of categories or series between tick marks. Applies only to category and series axes.

getTickMarkSpacing() : number;

Remarks

The number must be between 1 and 31999.

setTickMarkSpacing(number)

Returns or sets the number of categories or series between tick marks. Applies only to category and series axes.

setTickMarkSpacing(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

Remarks

The number must be between 1 and 31999.

getDisplayUnit()

Represents the unit label for the specified axis.

getDisplayUnit() : DisplayUnitType;

Returns

DisplayUnitType

setDisplayUnit(DisplayUnitType)

Represents the unit label for the specified axis.

setDisplayUnit(value: DisplayUnitType) : void;

Parameters:

ParameterTypeDescription
valueDisplayUnitTypeThe value to set.

getCustomUnit()

Specifies a custom value for the display unit.

getCustomUnit() : number;

setCustomUnit(number)

Specifies a custom value for the display unit.

setCustomUnit(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.

getDisplayUnitLabel()

Represents a unit label on an axis in the specified chart. Unit labels are useful for charting large values— for example, in the millions or billions.

getDisplayUnitLabel() : DisplayUnitLabel;

Returns

DisplayUnitLabel

isDisplayUnitLabelShown()

Represents if the display unit label is shown on the specified axis.

isDisplayUnitLabelShown() : boolean;

Remarks

The default value is True.

setIsDisplayUnitLabelShown(boolean)

Represents if the display unit label is shown on the specified axis.

setIsDisplayUnitLabelShown(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

The default value is True.

getTitle()

Gets the axis’ title.

getTitle() : Title;

Returns

Title

getCategoryType()

Represents the category axis type.

getCategoryType() : CategoryType;

Returns

CategoryType

setCategoryType(CategoryType)

Represents the category axis type.

setCategoryType(value: CategoryType) : void;

Parameters:

ParameterTypeDescription
valueCategoryTypeThe value to set.

getBaseUnitScale()

Represents the base unit scale for the category axis.

getBaseUnitScale() : TimeUnit;

Returns

TimeUnit

Remarks

Setting this property only takes effect when the CategoryType property is set to TimeScale.

setBaseUnitScale(TimeUnit)

Represents the base unit scale for the category axis.

setBaseUnitScale(value: TimeUnit) : void;

Parameters:

ParameterTypeDescription
valueTimeUnitThe value to set.

Remarks

Setting this property only takes effect when the CategoryType property is set to TimeScale.

getMajorUnitScale()

Represents the major unit scale for the category axis.

getMajorUnitScale() : TimeUnit;

Returns

TimeUnit

setMajorUnitScale(TimeUnit)

Represents the major unit scale for the category axis.

setMajorUnitScale(value: TimeUnit) : void;

Parameters:

ParameterTypeDescription
valueTimeUnitThe value to set.

getMinorUnitScale()

Represents the major unit scale for the category axis.

getMinorUnitScale() : TimeUnit;

Returns

TimeUnit

setMinorUnitScale(TimeUnit)

Represents the major unit scale for the category axis.

setMinorUnitScale(value: TimeUnit) : void;

Parameters:

ParameterTypeDescription
valueTimeUnitThe value to set.

isVisible()

Represents if the axis is visible.

isVisible() : boolean;

setIsVisible(boolean)

Represents if the axis is visible.

setIsVisible(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getMajorGridLines()

Represents major gridlines on a chart axis.

getMajorGridLines() : Line;

Returns

Line

getMinorGridLines()

Represents minor gridlines on a chart axis.

getMinorGridLines() : Line;

Returns

Line

getHasMultiLevelLabels()

Indicates whether the labels shall be shown as multi level.

getHasMultiLevelLabels() : boolean;

Remarks

Only valid for category axis.

setHasMultiLevelLabels(boolean)

Indicates whether the labels shall be shown as multi level.

setHasMultiLevelLabels(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

Remarks

Only valid for category axis.

getBins()

Represents bins on a chart(Histogram/Pareto) axis

getBins() : AxisBins;

Returns

AxisBins

getAxisTexts()

Gets the labels of the axis after call Chart.Calculate() method.

getAxisTexts() : string[];

Returns

string[]