2021-02-08 19:54:39 +01:00
### Common options to all axes
2020-11-16 21:05:29 +01:00
2021-02-19 17:44:05 +01:00
Namespace: `options.scales[scaleId]`
2020-11-16 21:05:29 +01:00
| Name | Type | Default | Description
| ---- | ---- | ------- | -----------
| `type` | `string` | | Type of scale being employed. Custom scales can be created and registered with a string key. This allows changing the type of an axis for a chart.
2021-03-16 13:41:51 +01:00
| `alignToPixels` | `boolean` | `false` | Align pixel values to device pixels.
2021-04-04 20:19:07 +02:00
| `backgroundColor` | [`Color` ](/general/colors.md ) | | Background color of the scale area.
2022-08-18 15:07:46 +02:00
| `border` | `object` | | Border configuration. [more... ](/axes/styling.md#border-configuration )
2020-11-16 21:05:29 +01:00
| `display` | `boolean` \|`string` | `true` | 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.
2021-04-04 20:19:07 +02:00
| `grid` | `object` | | Grid line configuration. [more... ](/axes/styling.md#grid-line-configuration )
| `min` | `number` | | User defined minimum number for the scale, overrides minimum value from data. [more... ](/axes/index.md#axis-range-settings )
| `max` | `number` | | User defined maximum number for the scale, overrides maximum value from data. [more... ](/axes/index.md#axis-range-settings )
2020-11-16 21:05:29 +01:00
| `reverse` | `boolean` | `false` | Reverse the scale.
2021-04-04 20:19:07 +02:00
| `stacked` | `boolean` \|`string` | `false` | Should the data be stacked. [more... ](/axes/index.md#stacking )
| `suggestedMax` | `number` | | Adjustment used when calculating the maximum data value. [more... ](/axes/index.md#axis-range-settings )
| `suggestedMin` | `number` | | Adjustment used when calculating the minimum data value. [more... ](/axes/index.md#axis-range-settings )
| `ticks` | `object` | | Tick configuration. [more... ](/axes/index.md#tick-configuration )
2020-11-16 21:05:29 +01:00
| `weight` | `number` | `0` | The weight used to sort the axis. Higher weights are further away from the chart area.