]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Tick backdrop padding is not scriptable (#9191)
authorEvert Timberg <evert.timberg+github@gmail.com>
Sun, 30 May 2021 20:59:49 +0000 (16:59 -0400)
committerGitHub <noreply@github.com>
Sun, 30 May 2021 20:59:49 +0000 (16:59 -0400)
* Tick backdrop padding is not scriptable
* Remove unneeded change
* Update _scriptable for callback

docs/axes/_common_ticks.md
src/core/core.scale.defaults.js

index 1c17aba395b0e484aa15b9dd8092b00337f61000..2a7c9512fa6882da6b8a75579cf643d2402d4cf7 100644 (file)
@@ -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.
index 960d17949625fdf8a568c733d3fb51486cd696d5..c067b3e5cae28111e69242de0d3c40e9a9b04c68 100644 (file)
@@ -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',
+});