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:
Evert Timberg
2021-03-13 17:37:43 -05:00
committed by GitHub
parent 96f6b42c57
commit d84db2cefc
7 changed files with 94 additions and 24 deletions

View 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
}
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -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: {