Axis

Axis class

Encapsulates the object that represents an axis of chart.

Methods

NameDescription
getArea()Gets the Area.
getAxisBetweenCategories()Represents if the value axis crosses the category axis between categories. This property applies only to category axes,
getAxisLabels()Gets the labels of the axis after call Chart.Calculate() method. NOTE: This member is now obsolete. Instead, please use
getAxisLine()Gets the appearance of an Axis.
getAxisTexts()Gets the labels of the axis after call Chart.Calculate() method.
getBaseUnitScale()Represents the base unit scale for the category axis. The value of the property is TimeUnit integer constant.Setting thi
getBins()Represents bins on a chart(Histogram/Pareto) axis
getCategoryType()Represents the category axis type. The value of the property is CategoryType integer constant.
getCrossAt()Represents the point on the value axis where the category axis crosses it. The number should be a integer when it applie
getCrossType()Represents the CrossType on the specified axis where the other axis crosses. The value of the property is CrossType inte
getCustUnit()Specifies a custom value for the display unit. NOTE: This property is now obsolete. Instead, please use Axis.CustomUnit
getCustomDisplayUnit()
getCustomUnit()Specifies a custom value for the display unit.
getDisplayUnit()Represents the unit label for the specified axis. The value of the property is DisplayUnitType integer constant.
getDisplayUnitLabel()Represents a unit label on an axis in the specified chart. Unit labels are useful for charting large values— for example
getLogBase()Represents the logarithmic base. Default value is 10.Only applies for Excel2007.
getMajorGridLines()Represents major gridlines on a chart axis.
getMajorTickMark()Represents the type of major tick mark for the specified axis. The value of the property is TickMarkType integer constan
getMajorUnit()Represents the major units for the axis. The major units must be greater than zero.
getMajorUnitScale()Represents the major unit scale for the category axis. The value of the property is TimeUnit integer constant.
getMaxValue()Represents the maximum value on the value axis. The maxValue type only can be double or DateTime
getMinValue()Represents the minimum value on the value axis. The minValue type only can be double or DateTime
getMinorGridLines()Represents minor gridlines on a chart axis.
getMinorTickMark()Represents the type of minor tick mark for the specified axis. The value of the property is TickMarkType integer constan
getMinorUnit()Represents the minor units for the axis. The minor units must be greater than zero.
getMinorUnitScale()Represents the major unit scale for the category axis. The value of the property is TimeUnit integer constant.
getTickLabelPosition()Represents the position of tick-mark labels on the specified axis. The value of the property is TickLabelPositionType in
getTickLabelSpacing()Represents the number of categories or series between tick-mark labels. Applies only to category and series axes. The nu
getTickLabels()Returns a TickLabels object that represents the tick-mark labels for the specified axis.
getTickMarkSpacing()Returns or sets the number of categories or series between tick marks. Applies only to category and series axes. The num
getTitle()Gets the axis’ title.
hasMultiLevelLabels()Indicates whether the labels shall be shown as multi level. Only valid for category axis.
isAutoTickLabelSpacing()Indicates whether the spacing of tick label is automatic
isAutomaticMajorUnit()Indicates whether the major unit of the axis is automatically assigned.
isAutomaticMaxValue()Indicates whether the max value is automatically assigned.
isAutomaticMinValue()Indicates whether the min value is automatically assigned.
isAutomaticMinorUnit()Indicates whether the minor unit of the axis is automatically assigned.
isBaseUnitAuto()Represents whether the base unit is automatic.
isDisplayUnitLabelShown()Represents if the display unit label is shown on the specified axis. The default value is True.
isLogarithmic()Represents if the value axis scale type is logarithmic or not.
isPlotOrderReversed()Represents if Microsoft Excel plots data points from last to first.
isVisible()Represents if the axis is visible.
setAutoTickLabelSpacing()Indicates whether the spacing of tick label is automatic
setAutomaticMajorUnit()Indicates whether the major unit of the axis is automatically assigned.
setAutomaticMaxValue()Indicates whether the max value is automatically assigned.
setAutomaticMinValue()Indicates whether the min value is automatically assigned.
setAutomaticMinorUnit()Indicates whether the minor unit of the axis is automatically assigned.
setAxisBetweenCategories()Represents if the value axis crosses the category axis between categories. This property applies only to category axes,
setBaseUnitAuto()Represents whether the base unit is automatic.
setBaseUnitScale()Represents the base unit scale for the category axis. The value of the property is TimeUnit integer constant.Setting thi
setCategoryType()Represents the category axis type. The value of the property is CategoryType integer constant.
setCrossAt()Represents the point on the value axis where the category axis crosses it. The number should be a integer when it applie
setCrossType()Represents the CrossType on the specified axis where the other axis crosses. The value of the property is CrossType inte
setCustUnit()Specifies a custom value for the display unit. NOTE: This property is now obsolete. Instead, please use Axis.CustomUnit
setCustomDisplayUnit()
setCustomUnit()Specifies a custom value for the display unit.
setDisplayUnit()Represents the unit label for the specified axis. The value of the property is DisplayUnitType integer constant.
setDisplayUnitLabelShown()Represents if the display unit label is shown on the specified axis. The default value is True.
setHasMultiLevelLabels()Indicates whether the labels shall be shown as multi level. Only valid for category axis.
setLogBase()Represents the logarithmic base. Default value is 10.Only applies for Excel2007.
setLogarithmic()Represents if the value axis scale type is logarithmic or not.
setMajorTickMark()Represents the type of major tick mark for the specified axis. The value of the property is TickMarkType integer constan
setMajorUnit()Represents the major units for the axis. The major units must be greater than zero.
setMajorUnitScale()Represents the major unit scale for the category axis. The value of the property is TimeUnit integer constant.
setMaxValue()Represents the maximum value on the value axis. The maxValue type only can be double or DateTime
setMinValue()Represents the minimum value on the value axis. The minValue type only can be double or DateTime
setMinorTickMark()Represents the type of minor tick mark for the specified axis. The value of the property is TickMarkType integer constan
setMinorUnit()Represents the minor units for the axis. The minor units must be greater than zero.
setMinorUnitScale()Represents the major unit scale for the category axis. The value of the property is TimeUnit integer constant.
setPlotOrderReversed()Represents if Microsoft Excel plots data points from last to first.
setTickLabelPosition()Represents the position of tick-mark labels on the specified axis. The value of the property is TickLabelPositionType in
setTickLabelSpacing()Represents the number of categories or series between tick-mark labels. Applies only to category and series axes. The nu
setTickMarkSpacing()Returns or sets the number of categories or series between tick marks. Applies only to category and series axes. The num
setVisible()Represents if the axis is visible.

getArea()

Gets the Area.

getAxisBetweenCategories()

Represents if the value axis crosses the category axis between categories. This property applies only to category axes, and it doesn’t apply to 3-D charts.

getAxisLabels()

Gets the labels of the axis after call Chart.Calculate() method. NOTE: This member is now obsolete. Instead, please use Axis.GetAxisTexts method. This property will be removed 12 months later since November 2023. Aspose apologizes for any inconvenience you may have experienced.

getAxisLine()

Gets the appearance of an Axis.

getAxisTexts()

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

getBaseUnitScale()

Represents the base unit scale for the category axis. The value of the property is TimeUnit integer constant.Setting this property only takes effect when the CategoryType property is set to TimeScale.

getBins()

Represents bins on a chart(Histogram/Pareto) axis

getCategoryType()

Represents the category axis type. The value of the property is CategoryType integer constant.

getCrossAt()

Represents the point on the value axis where the category axis crosses it. 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. The value of the property is CrossType integer constant.

getCustUnit()

Specifies a custom value for the display unit. NOTE: This property is now obsolete. Instead, please use Axis.CustomUnit property. This property will be removed 12 months later since January 2023. Aspose apologizes for any inconvenience you may have experienced.

getCustomDisplayUnit()

getCustomUnit()

Specifies a custom value for the display unit.

getDisplayUnit()

Represents the unit label for the specified axis. The value of the property is DisplayUnitType integer constant.

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.

getLogBase()

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

getMajorGridLines()

Represents major gridlines on a chart axis.

Example:

chart.getValueAxis().getMajorGridLines().setVisible(false);
chart.getCategoryAxis().getMajorGridLines().setVisible(true);

getMajorTickMark()

Represents the type of major tick mark for the specified axis. The value of the property is TickMarkType integer constant.

getMajorUnit()

Represents the major units for the axis. The major units must be greater than zero.

getMajorUnitScale()

Represents the major unit scale for the category axis. The value of the property is TimeUnit integer constant.

Example:

chart.getCategoryAxis().setCategoryType(aspose.cells.CategoryType.TIME_SCALE);
chart.getCategoryAxis().setMajorUnitScale(aspose.cells.TimeUnit.MONTHS);
chart.getCategoryAxis().setMajorUnit(2);

getMaxValue()

Represents the maximum value on the value axis. The maxValue type only can be double or DateTime

getMinValue()

Represents the minimum value on the value axis. The minValue type only can be double or DateTime

getMinorGridLines()

Represents minor gridlines on a chart axis.

getMinorTickMark()

Represents the type of minor tick mark for the specified axis. The value of the property is TickMarkType integer constant.

getMinorUnit()

Represents the minor units for the axis. The minor units must be greater than zero.

getMinorUnitScale()

Represents the major unit scale for the category axis. The value of the property is TimeUnit integer constant.

Example:

chart.getCategoryAxis().setCategoryType(aspose.cells.CategoryType.TIME_SCALE);
chart.getCategoryAxis().setMinorUnitScale(aspose.cells.TimeUnit.MONTHS);
chart.getCategoryAxis().setMinorUnit(2);

getTickLabelPosition()

Represents the position of tick-mark labels on the specified axis. The value of the property is TickLabelPositionType integer constant.

getTickLabelSpacing()

Represents the number of categories or series between tick-mark labels. Applies only to category and series axes. The number must be between 1 and 31999.

getTickLabels()

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

getTickMarkSpacing()

Returns or sets the number of categories or series between tick marks. Applies only to category and series axes. The number must be between 1 and 31999.

getTitle()

Gets the axis’ title.

hasMultiLevelLabels()

Indicates whether the labels shall be shown as multi level. Only valid for category axis.

isAutoTickLabelSpacing()

Indicates whether the spacing of tick label is automatic

isAutomaticMajorUnit()

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

isAutomaticMaxValue()

Indicates whether the max value is automatically assigned.

isAutomaticMinValue()

Indicates whether the min value is automatically assigned.

isAutomaticMinorUnit()

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

isBaseUnitAuto()

Represents whether the base unit is automatic.

isDisplayUnitLabelShown()

Represents if the display unit label is shown on the specified axis. The default value is True.

isLogarithmic()

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

isPlotOrderReversed()

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

isVisible()

Represents if the axis is visible.

setAutoTickLabelSpacing()

Indicates whether the spacing of tick label is automatic

setAutomaticMajorUnit()

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

setAutomaticMaxValue()

Indicates whether the max value is automatically assigned.

setAutomaticMinValue()

Indicates whether the min value is automatically assigned.

setAutomaticMinorUnit()

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

setAxisBetweenCategories()

Represents if the value axis crosses the category axis between categories. This property applies only to category axes, and it doesn’t apply to 3-D charts.

setBaseUnitAuto()

Represents whether the base unit is automatic.

setBaseUnitScale()

Represents the base unit scale for the category axis. The value of the property is TimeUnit integer constant.Setting this property only takes effect when the CategoryType property is set to TimeScale.

setCategoryType()

Represents the category axis type. The value of the property is CategoryType integer constant.

setCrossAt()

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

setCrossType()

Represents the CrossType on the specified axis where the other axis crosses. The value of the property is CrossType integer constant.

setCustUnit()

Specifies a custom value for the display unit. NOTE: This property is now obsolete. Instead, please use Axis.CustomUnit property. This property will be removed 12 months later since January 2023. Aspose apologizes for any inconvenience you may have experienced.

setCustomDisplayUnit()

setCustomUnit()

Specifies a custom value for the display unit.

setDisplayUnit()

Represents the unit label for the specified axis. The value of the property is DisplayUnitType integer constant.

setDisplayUnitLabelShown()

Represents if the display unit label is shown on the specified axis. The default value is True.

setHasMultiLevelLabels()

Indicates whether the labels shall be shown as multi level. Only valid for category axis.

setLogBase()

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

setLogarithmic()

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

setMajorTickMark()

Represents the type of major tick mark for the specified axis. The value of the property is TickMarkType integer constant.

setMajorUnit()

Represents the major units for the axis. The major units must be greater than zero.

setMajorUnitScale()

Represents the major unit scale for the category axis. The value of the property is TimeUnit integer constant.

Example:

chart.getCategoryAxis().setCategoryType(aspose.cells.CategoryType.TIME_SCALE);
chart.getCategoryAxis().setMajorUnitScale(aspose.cells.TimeUnit.MONTHS);
chart.getCategoryAxis().setMajorUnit(2);

setMaxValue()

Represents the maximum value on the value axis. The maxValue type only can be double or DateTime

setMinValue()

Represents the minimum value on the value axis. The minValue type only can be double or DateTime

setMinorTickMark()

Represents the type of minor tick mark for the specified axis. The value of the property is TickMarkType integer constant.

setMinorUnit()

Represents the minor units for the axis. The minor units must be greater than zero.

setMinorUnitScale()

Represents the major unit scale for the category axis. The value of the property is TimeUnit integer constant.

Example:

chart.getCategoryAxis().setCategoryType(aspose.cells.CategoryType.TIME_SCALE);
chart.getCategoryAxis().setMinorUnitScale(aspose.cells.TimeUnit.MONTHS);
chart.getCategoryAxis().setMinorUnit(2);

setPlotOrderReversed()

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

setTickLabelPosition()

Represents the position of tick-mark labels on the specified axis. The value of the property is TickLabelPositionType integer constant.

setTickLabelSpacing()

Represents the number of categories or series between tick-mark labels. Applies only to category and series axes. The number must be between 1 and 31999.

setTickMarkSpacing()

Returns or sets the number of categories or series between tick marks. Applies only to category and series axes. The number must be between 1 and 31999.

setVisible()

Represents if the axis is visible.