mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-03 06:54:02 +01:00
Radial scale point label backdrop color (#8633)
* Radial scale point label backdrop color * Update default tests * backdropPadding is a single setting * Up the tolerance a bit * Update tick backdrop padding options
This commit is contained in:
@@ -34,8 +34,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.
|
||||
| `backdropPaddingX` | `number` | | `2` | Horizontal padding of label backdrop.
|
||||
| `backdropPaddingY` | `number` | | `2` | Vertical padding of label backdrop.
|
||||
| `backdropPadding` | `number`\|`{top: number, bottom: number}` | | `2` | Padding of label backdrop.
|
||||
| `format` | `object` | | | The [`Intl.NumberFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat) options used by the default label formatter
|
||||
| `maxTicksLimit` | `number` | | `11` | Maximum number of ticks and gridlines to show.
|
||||
| `precision` | `number` | | | if defined and `stepSize` is not specified, the step size will be rounded to this many decimal places.
|
||||
@@ -126,6 +125,8 @@ Namespace: `options.scales[scaleId].pointLabels`
|
||||
|
||||
| Name | Type | Scriptable | Default | Description
|
||||
| ---- | ---- | ------- | ------- | -----------
|
||||
| `backdropColor` | [`Color`](../../general/colors.md) | `true` | `undefined` | Background color of the point label.
|
||||
| `backdropPadding` | `number`\|`{top: number, bottom: number}` | | `2` | Padding of label backdrop.
|
||||
| `display` | `boolean` | | `true` | if true, point labels are shown.
|
||||
| `callback` | `function` | | | Callback function to transform data labels to point labels. The default implementation simply returns the current string.
|
||||
| `color` | [`Color`](../../general/colors.md) | Yes | `Chart.defaults.color` | Color of label.
|
||||
|
||||
@@ -235,6 +235,7 @@ Animation system was completely rewritten in Chart.js v3. Each property can now
|
||||
* `options.ticks.fixedStepSize` is no longer used. Use `options.ticks.stepSize`.
|
||||
* `options.ticks.major` and `options.ticks.minor` were replaced with scriptable options for tick fonts.
|
||||
* `Chart.Ticks.formatters.linear` was renamed to `Chart.Ticks.formatters.numeric`.
|
||||
* `options.ticks.backdropPaddingX` and `options.ticks.backdropPaddingY` were replaced with `options.ticks.backdropPadding` in the radial linear scale.
|
||||
|
||||
#### Tooltip
|
||||
|
||||
|
||||
Reference in New Issue
Block a user