# Interface: CartesianScaleOptions

# Hierarchy

# Properties

# alignToPixels

alignToPixels: boolean

Align pixel values to device pixels

Inherited from: CoreScaleOptions.alignToPixels

Defined in: index.esm.d.ts:1071 (opens new window)


# axis

axis: x | y

Which type of axis this is. Possible values are: 'x', 'y'. If not set, this is inferred from the first character of the ID which should be 'x' or 'y'.

Defined in: index.esm.d.ts:2682 (opens new window)


# display

display: boolean | auto

Controls the axis global visibility (visible when true, hidden when false). When display: 'auto', the axis is visible only if at least one associated dataset is visible.

default true

Inherited from: CoreScaleOptions.display

Defined in: index.esm.d.ts:1067 (opens new window)


# grid

grid: GridLineOptions

Defined in: index.esm.d.ts:2700 (opens new window)


# max

max: number

User defined maximum value for the scale, overrides maximum value from data.

Defined in: index.esm.d.ts:2692 (opens new window)


# min

min: number

User defined minimum value for the scale, overrides minimum value from data.

Defined in: index.esm.d.ts:2687 (opens new window)


# offset

offset: boolean

If true, extra space is added to the both edges and the axis is scaled to fit into the chart area. This is set to true for a bar chart by default.

default false

Defined in: index.esm.d.ts:2698 (opens new window)


# position

position: left | right | bottom | top | center | { [scale: string]: number; }

Position of the axis.

Defined in: index.esm.d.ts:2678 (opens new window)


# reverse

reverse: boolean

Reverse the scale.

default false

Inherited from: CoreScaleOptions.reverse

Defined in: index.esm.d.ts:1076 (opens new window)


# stacked

Optional stacked: boolean | single

If true, data will be comprised between datasets of data

default false

Defined in: index.esm.d.ts:2717 (opens new window)


# ticks

ticks: TickOptions & { align: start | end | center ; autoSkip: boolean ; autoSkipPadding: number ; crossAlign: center | near | far ; labelOffset: number ; maxRotation: number ; minRotation: number ; mirror: boolean ; padding: number ; sampleSize: number }

Defined in: index.esm.d.ts:2719 (opens new window)


# title

title: object

# Type declaration:

Name Type
color Color
display boolean
font FontSpec
padding object
padding.bottom number
padding.top number
text string | string[]

Defined in: index.esm.d.ts:2702 (opens new window)


# weight

weight: number

The weight used to sort the axis. Higher weights are further away from the chart area.

default true

Inherited from: CoreScaleOptions.weight

Defined in: index.esm.d.ts:1081 (opens new window)

# Methods

# afterBuildTicks

afterBuildTicks(axis: Scale<CoreScaleOptions>): void

Callback that runs after ticks are created. Useful for filtering ticks.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1109 (opens new window)


# afterCalculateTickRotation

afterCalculateTickRotation(axis: Scale<CoreScaleOptions>): void

Callback that runs after tick rotation is determined.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1125 (opens new window)


# afterDataLimits

afterDataLimits(axis: Scale<CoreScaleOptions>): void

Callback that runs after data limits are determined.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1101 (opens new window)


# afterFit

afterFit(axis: Scale<CoreScaleOptions>): void

Callback that runs after the scale fits to the canvas.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1133 (opens new window)


# afterSetDimensions

afterSetDimensions(axis: Scale<CoreScaleOptions>): void

Callback that runs after dimensions are set.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1093 (opens new window)


# afterTickToLabelConversion

afterTickToLabelConversion(axis: Scale<CoreScaleOptions>): void

Callback that runs after ticks are converted into strings.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1117 (opens new window)


# afterUpdate

afterUpdate(axis: Scale<CoreScaleOptions>): void

Callback that runs at the end of the update process.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1137 (opens new window)


# beforeBuildTicks

beforeBuildTicks(axis: Scale<CoreScaleOptions>): void

Callback that runs before ticks are created.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1105 (opens new window)


# beforeCalculateTickRotation

beforeCalculateTickRotation(axis: Scale<CoreScaleOptions>): void

Callback that runs before tick rotation is determined.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1121 (opens new window)


# beforeDataLimits

beforeDataLimits(axis: Scale<CoreScaleOptions>): void

Callback that runs before data limits are determined.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1097 (opens new window)


# beforeFit

beforeFit(axis: Scale<CoreScaleOptions>): void

Callback that runs before the scale fits to the canvas.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1129 (opens new window)


# beforeSetDimensions

beforeSetDimensions(axis: Scale<CoreScaleOptions>): void

Callback that runs before dimensions are set.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1089 (opens new window)


# beforeTickToLabelConversion

beforeTickToLabelConversion(axis: Scale<CoreScaleOptions>): void

Callback that runs before ticks are converted into strings.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1113 (opens new window)


# beforeUpdate

beforeUpdate(axis: Scale<CoreScaleOptions>): void

Callback called before the update process starts.

# Parameters:

Name Type
axis Scale<CoreScaleOptions>

Returns: void

Inherited from: CoreScaleOptions

Defined in: index.esm.d.ts:1085 (opens new window)