Represents a single axis in a chart.

To change the color of the ticklines, use the [[ChartLineBase.fill]] property.

Hierarchy

Hierarchy (view full)

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get axisBetweenCategories(): boolean
  • True if the value axis crosses the category axis between categories.

    Returns boolean

  • set axisBetweenCategories(a): void
  • Parameters

    • a: boolean

    Returns void

  • get axisGroup(): AxisGroup
  • Returns the group for the specified axis. Read-only

    Returns AxisGroup

  • get axisTitle(): ChartTitle
  • Returns or sets a [[ChartTitle]] object that represents the title of the axis.

    Returns ChartTitle

  • set axisTitle(a): void
  • Parameters

    Returns void

  • get baseUnit(): TimeUnit
  • Returns or sets the base unit for the axis. Setting this property has no visible effect if the [[categoryType]] property for the specified axis is set to 'CategoryScale'. The set value is retained, however, and takes effect when the CategoryType property is set to 'TimeScale'.

    Returns TimeUnit

  • set baseUnit(a): void
  • Parameters

    Returns void

  • get baseUnitIsAuto(): boolean
  • True if Excel chooses appropriate base units for the specified category axis. The default value is True.

    Returns boolean

  • set baseUnitIsAuto(a): void
  • Parameters

    • a: boolean

    Returns void

  • get categoryType(): CategoryType
  • Returns or sets the category axis type.

    This property applies only to category axes.

    When set to Automatic, the axis will resolve the category type to either CategoryScale or TimeScale, based on the type of the selected data.

    Returns CategoryType

  • set categoryType(a): void
  • Parameters

    Returns void

  • get chart(): WorksheetChart
  • Returns the owning chart (read-only)

    See

    [[owner]]

    Returns WorksheetChart

  • get crosses(): AxisCrosses
  • Returns or sets the point on the specified axis where the other axis crosses.

    This property is only applicable to a category axis.

    Set this property to Custom to specify a data value as a crossing point, using the [[crossesAt]] property to specify that value.

    See

    [[crossesAt]]

    Returns AxisCrosses

  • set crosses(a): void
  • Parameters

    Returns void

  • get crossesAt(): number
  • Returns or sets the point on the [[Axis]] at which the perpendicular axis intersects it.

    For a category axis, this value is interpreted as the value of a data point. For example, on a category axis with a minimum data value of 0 and a maximum of 500, setting this property to 250 causes this axis to appear near the center of the plot area.

    For a value axis, this value is interpreted as the one-based number of the category with which this axis should intersect.

    Setting this property causes the [[crosses]] property to change to 'Custom'.

    This property cannot be used on radar charts.

    For 3-D charts, this property indicates where the plane defined by the category axes crosses the value axis.

    Returns number

  • set crossesAt(a): void
  • Parameters

    • a: number

    Returns void

  • get displayUnit(): DisplayUnit
  • Returns or sets the unit label for the value axis.

    Returns DisplayUnit

  • set displayUnit(a): void
  • Parameters

    Returns void

  • get displayUnitCustom(): number
  • If the value of the DisplayUnit property 'Custom' , the DisplayUnitCustom property returns or sets the value of the displayed units. The value must be from 0 through 10E307

    Returns number

  • set displayUnitCustom(a): void
  • Parameters

    • a: number

    Returns void

  • get displayUnitLabel(): DisplayUnitLabel
  • Returns or sets an [[displayUnitLabel]] object.

    Returns DisplayUnitLabel

  • set displayUnitLabel(a): void
  • Parameters

    Returns void

  • get gapWidth(): number
  • Returns or sets a value indicating the width of the gaps between data points or series, expressed as a percentage.

    This property is only applicable for Box and Whisker, Histogram, Pareto, and Waterfall charts.

    Returns number

  • set gapWidth(a): void
  • Parameters

    • a: number

    Returns void

  • get logBase(): number
  • Returns or sets the base of the logarithm when you are using log scales. Attempting to set this property to a value less than 2 causes an error. The default value is 10.

    Returns number

  • set logBase(a): void
  • Parameters

    • a: number

    Returns void

  • get majorGridLines(): ChartGridLines
  • Returns a [[ChartGridLines]] object which defines the color and weight of the major ticklines.

    Returns ChartGridLines

  • set majorGridLines(a): void
  • Parameters

    Returns void

  • get majorTickMark(): TickMark
  • Returns or sets the type of major tick mark for the specified axis.

    Returns TickMark

  • set majorTickMark(a): void
  • Parameters

    Returns void

  • get majorUnit(): number
  • Returns the major interval unit.

    To set the value of this property, use the [[setMajorMinorUnit]] method.

    See

    • [[setMajorMinorUnit]]
    • [[minorUnit]]

    Returns number

  • set majorUnit(a): void
  • Parameters

    • a: number

    Returns void

  • get majorUnitIsAuto(): boolean
  • True if Excel calculates the major units for the value axis.

    Returns boolean

  • set majorUnitIsAuto(a): void
  • Parameters

    • a: boolean

    Returns void

  • get majorUnitScale(): TimeUnit
  • Returns or sets the major unit scale value for the category axis when the [[categoryType]] property is set to 'TimeScale'.

    Returns TimeUnit

  • set majorUnitScale(a): void
  • Parameters

    Returns void

  • get maximumScale(): number
  • Returns or sets the maximum value on the value axis.

    Returns number

  • set maximumScale(a): void
  • Parameters

    • a: number

    Returns void

  • get maximumScaleIsAuto(): boolean
  • True if Excel calculates the maximum value for the value axis.

    Returns boolean

  • set maximumScaleIsAuto(a): void
  • Parameters

    • a: boolean

    Returns void

  • get minimumScale(): number
  • Returns or sets the minimum value on the value axis.

    Returns number

  • set minimumScale(a): void
  • Parameters

    • a: number

    Returns void

  • get minimumScaleIsAuto(): boolean
  • True if Excel calculates the minimum value for the value axis.

    Returns boolean

  • set minimumScaleIsAuto(a): void
  • Parameters

    • a: boolean

    Returns void

  • get minorGridLines(): ChartGridLines
  • Returns a [[ChartGridLines]] object which defines the color and weight of the minor ticklines.

    Returns ChartGridLines

  • set minorGridLines(a): void
  • Parameters

    Returns void

  • get minorTickMark(): TickMark
  • Returns or sets the type of minor tick mark for the specified axis.

    Returns TickMark

  • set minorTickMark(a): void
  • Parameters

    Returns void

  • get minorUnit(): number
  • Returns the minor interval unit.

    To set the value of this property, use the [[setMajorMinorUnit]] method.

    See

    • [[setMajorMinorUnit]]
    • [[majorUnit]]

    Returns number

  • set minorUnit(a): void
  • Parameters

    • a: number

    Returns void

  • get minorUnitIsAuto(): boolean
  • True if Excel calculates the minor units for the value axis.

    Returns boolean

  • set minorUnitIsAuto(a): void
  • Parameters

    • a: boolean

    Returns void

  • get minorUnitScale(): TimeUnit
  • Returns or sets the minor unit scale value for the category axis when the [[categoryType]] property is set to 'TimeScale'.

    Returns TimeUnit

  • set minorUnitScale(a): void
  • Parameters

    Returns void

  • get owner(): ChartObject
  • returns this object's owner. (read-only) The owner or null if this object is owned directly by the Chart

    See

    [[chart]]

    Returns ChartObject

  • get position(): AxisPosition
  • Returns or sets an [[AxisPosition]] value which determines the placement of the axis as relative to the chart space.

    This property is not applicable for series axes.

    Returns AxisPosition

  • set position(a): void
  • Parameters

    Returns void

  • get reversePlotOrder(): boolean
  • True if Excel plots data points from last to first.

    Returns boolean

  • set reversePlotOrder(a): void
  • Parameters

    • a: boolean

    Returns void

  • get scaleType(): ScaleType
  • Returns or sets a value indicating whether the axis scale is linear or logarithmic.

    This property is only applicable for value axes.

    Logarithmic scaling is not supported for axes which are associated with a series that contains negative values.

    Returns ScaleType

  • set scaleType(a): void
  • Parameters

    Returns void

  • get sheet(): Sheet
  • The owning sheet (read-only)

    Returns Sheet

  • get tickLabelPosition(): TickLabelPosition
  • Describes the position of tick-mark labels on the specified axis.

    Returns TickLabelPosition

  • set tickLabelPosition(a): void
  • Parameters

    Returns void

  • get tickLabelSpacing(): number
  • Returns or sets the number of categories or series between tick-mark labels. Applies only to category and series axes. Can be a value from 1 through 31999.

    Returns number

  • set tickLabelSpacing(a): void
  • Parameters

    • a: number

    Returns void

  • get tickLabelSpacingIsAuto(): boolean
  • Returns or sets whether or not the tick label spacing is automatic.

    Returns boolean

  • set tickLabelSpacingIsAuto(a): void
  • Parameters

    • a: boolean

    Returns void

  • get tickLabels(): TickLabels
  • Returns a TickLabels object that represents the tick-mark labels for the specified axis. Read-only.

    Returns TickLabels

  • get tickLines(): ChartTickLines
  • Determines the appearance of the tick lines.

    See

    • [[majorTickMark]]
    • [[minorTickMark]]

    Returns ChartTickLines

  • set tickLines(a): void
  • Parameters

    Returns void

  • get tickMarkSpacing(): number
  • Returns or sets the number of categories or series between tick marks. Applies only to category and series axes. Can be a value from 1 through 31999.

    Returns number

  • set tickMarkSpacing(a): void
  • Parameters

    • a: number

    Returns void

  • get type(): AxisType
  • Returns the type of the axis (read-only)

    Returns AxisType

  • get visible(): boolean
  • Returns or sets whether or not the axis is visible.

    Returns boolean

  • set visible(a): void
  • Parameters

    • a: boolean

    Returns void

  • get workbook(): Workbook
  • The owning workbook (read-only)

    Returns Workbook

  • get worksheet(): Worksheet
  • The owning worksheet (read-only)

    Returns Worksheet

Methods

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Returns Base

  • Sets the values of the [[majorUnit]] and [[minorUnit]] properties.

    The value of the 'majorUnit' parameter must exceed the value of the 'minorUnit' parameter or an exception is thrown.

    Typically the value of 'majorUnit' is an exact multiple of 'minorUnit'; for example, for 5 minor units per major unit, set majorUnit to 1 and minorUnit to .2.

    See

    • [[majorUnit]]
    • [[minorUnit]]

    Parameters

    • majorUnit: number

      The new value for the [[majorUnit]] property.

    • minorUnit: number

      The new value for the [[minorUnit]] property.

    Returns void

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean