stable colors

This commit is contained in:
Anton Volnuhin 2025-03-20 00:37:47 +03:00
parent ab3db53817
commit 8817727896

5
app.js
View File

@ -67,7 +67,7 @@ function transformToSunburst(data) {
// Predefined colors for categories
const colors = [
'#5470c6', '#91cc75', '#fac858', '#ee6666', '#73c0de',
'#3ba272', '#fc8452', '#9a60b4', '#ea7ccc', '#4cae72',
'#2d8041', '#fc8452', '#7b4d90', '#ea7ccc', '#4cae72',
'#d56358', '#82b1ff', '#f19143', '#addf84', '#6f7787'
];
@ -297,6 +297,7 @@ function renderChart(data) {
align: 'center',
position: 'inside',
distance: 5,
formatter: function(param) {
// If there's only one word, never wrap it
if (!param.name.includes(' ')) {
@ -359,7 +360,7 @@ function renderChart(data) {
emphasis: {
label: {
show: true,
distance: 20,
distance: 20
}
}
},