mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-03 15:04:03 +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:
50
test/fixtures/scale.radialLinear/pointLabels/background.js
vendored
Normal file
50
test/fixtures/scale.radialLinear/pointLabels/background.js
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
module.exports = {
|
||||
tolerance: 0.01,
|
||||
config: {
|
||||
type: 'radar',
|
||||
data: {
|
||||
labels: [
|
||||
['VENTE ET', 'COMMERCIALISATION'],
|
||||
['GESTION', 'FINANCIÈRE'],
|
||||
'NUMÉRIQUE',
|
||||
['ADMINISTRATION', 'ET OPÉRATION'],
|
||||
['RESSOURCES', 'HUMAINES'],
|
||||
'INNOVATION'
|
||||
],
|
||||
datasets: [
|
||||
{
|
||||
backgroundColor: '#E43E51',
|
||||
label: 'Compétences entrepreunariales',
|
||||
data: [3, 2, 2, 1, 3, 1]
|
||||
}
|
||||
]
|
||||
},
|
||||
options: {
|
||||
plugins: {
|
||||
legend: false,
|
||||
tooltip: false,
|
||||
filler: false
|
||||
},
|
||||
scales: {
|
||||
r: {
|
||||
min: 0,
|
||||
max: 3,
|
||||
pointLabels: {
|
||||
backdropColor: 'blue',
|
||||
backdropPadding: {left: 5, right: 5, top: 2, bottom: 2},
|
||||
},
|
||||
ticks: {
|
||||
display: false,
|
||||
stepSize: 1,
|
||||
maxTicksLimit: 1
|
||||
}
|
||||
}
|
||||
},
|
||||
responsive: true,
|
||||
maintainAspectRatio: false
|
||||
}
|
||||
},
|
||||
options: {
|
||||
spriteText: true
|
||||
}
|
||||
};
|
||||
BIN
test/fixtures/scale.radialLinear/pointLabels/background.png
vendored
Normal file
BIN
test/fixtures/scale.radialLinear/pointLabels/background.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
@@ -37,12 +37,13 @@ describe('Test the radial linear scale', function() {
|
||||
color: Chart.defaults.color,
|
||||
showLabelBackdrop: true,
|
||||
backdropColor: 'rgba(255,255,255,0.75)',
|
||||
backdropPaddingY: 2,
|
||||
backdropPaddingX: 2,
|
||||
backdropPadding: 2,
|
||||
callback: defaultConfig.ticks.callback
|
||||
},
|
||||
|
||||
pointLabels: {
|
||||
backdropColor: undefined,
|
||||
backdropPadding: 2,
|
||||
color: Chart.defaults.color,
|
||||
display: true,
|
||||
font: {
|
||||
|
||||
Reference in New Issue
Block a user