Chart.js/docs/axes/_common_ticks.md

16 lines
1.1 KiB
Markdown
Raw Normal View History

### Common tick options to all axes
2020-11-16 21:05:29 +01:00
Namespace: `options.scales[scaleId].ticks`
2020-11-16 21:05:29 +01:00
| Name | Type | Scriptable | Default | Description
| ---- | ---- | :-------------------------------: | ------- | -----------
| `callback` | `function` | | | Returns the string representation of the tick value as it should be displayed on the chart. See [callback](../axes/labelling.md#creating-custom-tick-formats).
| `display` | `boolean` | | `true` | If true, show tick labels.
| `color` | [`Color`](../general/colors.md) | Yes | `Chart.defaults.color` | Color of ticks.
| `font` | `Font` | Yes | `Chart.defaults.font` | See [Fonts](../general/fonts.md)
2021-04-02 13:48:50 +02:00
| `major` | `object` | | `{}` | [Major ticks configuration](./styling.md#major-tick-configuration).
| `padding` | `number` | | `3` | Sets the offset of the tick labels from the axis
| `textStrokeColor` | [`Color`](../general/colors.md) | Yes | `` | The color of the stroke around the text.
| `textStrokeWidth` | `number` | Yes | `0` | Stroke width around the text.
2020-11-16 21:05:29 +01:00
| `z` | `number` | | `0` | z-index of tick layer. Useful when ticks are drawn on chart area. Values <= 0 are drawn under datasets, > 0 on top.