From 88177278961d2e82ce9f798d800e2885d49f393f Mon Sep 17 00:00:00 2001 From: Anton Volnuhin Date: Thu, 20 Mar 2025 00:37:47 +0300 Subject: [PATCH] stable colors --- app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 2ac72d3..78fad3a 100644 --- a/app.js +++ b/app.js @@ -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 } } },