Skip to content

Class: ChartExAxis ​

One axis (cx:axis) of a chartEx plot area. chartEx axes carry no catAx/valAx element-name distinction; the kind is read from the scaling child (cx:catScaling vs cx:valScaling).

Constructors ​

Constructor ​

new ChartExAxis(ax, chart): ChartExAxis

Parameters ​

ParameterTypeDescription
axElement-
chartChartExThe owning chartEx chart, so markDirty can reach its part from element_.

Returns ​

ChartExAxis

Accessors ​

element_ ​

Get Signature ​

get element_(): Element

Escape hatch: the underlying cx:axis element. After mutating it call markDirty, or save() writes the original bytes.

Returns ​

Element


gapWidth ​

Get Signature ​

get gapWidth(): number | null

Category-axis gap width (cx:catScaling/@gapWidth) as a fraction (1.0 = 100%, the chartEx convention, unlike the classic integer percent), or null.

Returns ​

number | null


id ​

Get Signature ​

get id(): number | null

Axis id (@id), the value a series' cx:axisId binds to.

Returns ​

number | null


kind ​

Get Signature ​

get kind(): "val" | "cat" | null

Axis kind from its scaling child: cat (cx:catScaling) / val (cx:valScaling).

Returns ​

"val" | "cat" | null


majorGridlines ​

Get Signature ​

get majorGridlines(): boolean

Whether the axis draws major gridlines (cx:majorGridlines).

Returns ​

boolean


max ​

Get Signature ​

get max(): number | null

Value-axis scale maximum (cx:valScaling/@max), or null when auto.

Returns ​

number | null


min ​

Get Signature ​

get min(): number | null

Value-axis scale minimum (cx:valScaling/@min), or null when auto.

Returns ​

number | null


tickLabels ​

Get Signature ​

get tickLabels(): boolean

Whether the axis draws tick labels (cx:tickLabels).

Returns ​

boolean

Methods ​

markDirty() ​

markDirty(): void

Mark the owning chartEx part dirty so save() reserializes it. Call after mutating element_.

Returns ​

void