Skip to content

Commit

Permalink
Tick backdrop padding is not scriptable (#9191)
Browse files Browse the repository at this point in the history
* Tick backdrop padding is not scriptable
* Remove unneeded change
* Update _scriptable for callback
  • Loading branch information
etimberg committed May 30, 2021
1 parent 4ac38d0 commit 599e23a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/axes/_common_ticks.md
Expand Up @@ -5,7 +5,7 @@ Namespace: `options.scales[scaleId].ticks`
| Name | Type | Scriptable | Default | Description
| ---- | ---- | :-------------------------------: | ------- | -----------
| `backdropColor` | [`Color`](../../general/colors.md) | Yes | `'rgba(255, 255, 255, 0.75)'` | Color of label backdrops.
| `backdropPadding` | [`Padding`](../../general/padding.md) | Yes | `2` | Padding of label backdrop.
| `backdropPadding` | [`Padding`](../../general/padding.md) | | `2` | Padding of label backdrop.
| `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.
Expand Down
5 changes: 5 additions & 0 deletions src/core/core.scale.defaults.js
Expand Up @@ -92,3 +92,8 @@ defaults.describe('scale', {
defaults.describe('scales', {
_fallback: 'scale',
});

defaults.describe('scale.ticks', {
_scriptable: (name) => name !== 'backdropPadding' && name !== 'callback',
_indexable: (name) => name !== 'backdropPadding',
});

0 comments on commit 599e23a

Please sign in to comment.