Class: ChartAxis
One axis (c:catAx/c:valAx/c:dateAx/c:serAx) of a chart's plot area. All four share the scaling/delete/position/tickmark structure; kind distinguishes them.
Constructors
Constructor
new ChartAxis(
ax,part):ChartAxis
Parameters
| Parameter | Type | Description |
|---|---|---|
ax | Element | - |
part | Part | The owning chart's OPC part, so markDirty can reach it from element_. |
Returns
ChartAxis
Accessors
baseTimeUnit
Get Signature
get baseTimeUnit():
string|null
A date axis' base unit (c:baseTimeUnit: days, months, years), or null.
Returns
string | null
crossBetween
Get Signature
get crossBetween():
string|null
Whether a value axis crosses between categories or on them (c:crossBetween: between, midCat).
Returns
string | null
crosses
Get Signature
get crosses():
string|null
Where this axis crosses the other one, as a rule (c:crosses: autoZero, max, min), or null.
Returns
string | null
crossesAt
Get Signature
get crossesAt():
number|null
Where this axis crosses the other one, as a value on it (c:crossesAt), or null.
Returns
number | null
displayUnits
Get Signature
get displayUnits():
ChartDisplayUnits|null
A value axis' display units (c:dispUnits), or null when it shows plain values.
Returns
ChartDisplayUnits | null
element_
Get Signature
get element_():
Element
Escape hatch: the underlying axis element. After mutating it call markDirty, or save() writes the original bytes.
Returns
Element
hidden
Get Signature
get hidden():
boolean
Whether the axis is hidden (c:delete/@val = 1).
Returns
boolean
id
Get Signature
get id():
number|null
Axis id (c:axId/@val).
Returns
number | null
kind
Get Signature
get kind():
"val"|"cat"|"date"|"ser"|null
Axis kind derived from the element name: cat/val/date/ser.
Returns
"val" | "cat" | "date" | "ser" | null
labelSkip
Get Signature
get labelSkip():
number|null
How many categories pass between two labels (c:tickLblSkip), or null when automatic.
Returns
number | null
labelStyle
Get Signature
get labelStyle():
ChartTextStyle|null
The tick labels' text formatting and rotation (c:txPr), or null when the axis states none.
Returns
ChartTextStyle | null
line
Get Signature
get line():
ChartLine|null
The axis line's own stroke (c:spPr/a:ln), or null when it states none.
Returns
ChartLine | null
logBase
Get Signature
get logBase():
number|null
Logarithmic scale base (c:scaling/c:logBase/@val), or null when linear.
Returns
number | null
majorGridlines
Get Signature
get majorGridlines():
boolean
Whether the axis draws major gridlines (c:majorGridlines).
Returns
boolean
majorGridlinesLine
Get Signature
get majorGridlinesLine():
ChartLine|null
The major gridlines' stroke (c:majorGridlines/c:spPr/a:ln), or null when they state none.
Returns
ChartLine | null
majorTickMark
Get Signature
get majorTickMark():
string|null
Major tick-mark style (c:majorTickMark/@val): out/in/cross/none.
Returns
string | null
majorTimeUnit
Get Signature
get majorTimeUnit():
string|null
A date axis' major unit scale (c:majorTimeUnit), or null.
Returns
string | null
majorUnit
Get Signature
get majorUnit():
number|null
Major unit (c:majorUnit/@val), or null when auto.
Returns
number | null
max
Get Signature
get max():
number|null
Scale maximum (c:scaling/c:max/@val), or null when auto.
Returns
number | null
min
Get Signature
get min():
number|null
Scale minimum (c:scaling/c:min/@val), or null when auto.
Returns
number | null
minorGridlines
Get Signature
get minorGridlines():
boolean
Whether the axis draws minor gridlines (c:minorGridlines).
Returns
boolean
minorTickMark
Get Signature
get minorTickMark():
string|null
Minor tick-mark style (c:minorTickMark/@val).
Returns
string | null
minorTimeUnit
Get Signature
get minorTimeUnit():
string|null
A date axis' minor unit scale (c:minorTimeUnit), or null.
Returns
string | null
minorUnit
Get Signature
get minorUnit():
number|null
Minor unit (c:minorUnit/@val), or null when auto.
Returns
number | null
noMultiLevelLabels
Get Signature
get noMultiLevelLabels():
boolean|null
Whether a category axis flattens a multi-level category list (c:noMultiLvlLbl), or null when unstated.
Returns
boolean | null
numberFormat
Get Signature
get numberFormat():
AxisNumberFormat|null
Axis number format (c:numFmt), or null when absent.
Returns
AxisNumberFormat | null
orientation
Get Signature
get orientation():
string|null
Scaling orientation (c:scaling/c:orientation/@val): minMax/maxMin.
Returns
string | null
position
Get Signature
get position():
string|null
Axis position (c:axPos/@val): b/l/r/t.
Returns
string | null
tickLabelPosition
Get Signature
get tickLabelPosition():
string|null
Tick-label position (c:tickLblPos/@val): nextTo/high/low/none.
Returns
string | null
title
Get Signature
get title():
string|null
Axis title text (c:title rich text), or null when absent.
Returns
string | null
titleStyle
Get Signature
get titleStyle():
ChartTextStyle|null
The axis title's formatting (c:title/c:tx/c:rich), or null when it has no rich title.
Returns
ChartTextStyle | null
Methods
markDirty()
markDirty():
void
Mark the owning chart part dirty so save() reserializes it. Call after mutating element_.
Returns
void