From 91f2336ff4817b69c197a06da2031a49f9596651 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Wed, 5 Apr 2023 12:25:33 +0200 Subject: [PATCH] #10740 heatmap improvements 2 --- .../include/class/Heatmap.class.php | 20 ++++++++--- pandora_console/include/styles/heatmap.css | 34 +++++++++++++++---- 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/pandora_console/include/class/Heatmap.class.php b/pandora_console/include/class/Heatmap.class.php index e7b6ab6f2b..94b8fef429 100644 --- a/pandora_console/include/class/Heatmap.class.php +++ b/pandora_console/include/class/Heatmap.class.php @@ -1359,13 +1359,23 @@ class Heatmap if (count($groups) > 1 && $this->group === 1 && $this->dashboard === false) { $x_back = 0; $y_back = 0; + $x_text_correction = 0.25; - if ($count_result <= 100) { + if ($count_result <= 10) { $fontSize = 'small-size'; $stroke = 'small-stroke'; - } else { + } else if ($count_result > 10 && $count_result <= 100) { + $fontSize = 'tiny-size'; + $stroke = 'tiny-stroke'; + } else if ($count_result > 100 && $count_result <= 1000) { + $fontSize = 'medium-size'; + $stroke = 'medium-stroke'; + } else if ($count_result > 1000 && $count_result <= 10000) { $fontSize = 'big-size'; $stroke = 'big-stroke'; + } else { + $fontSize = 'huge-size'; + $stroke = 'huge-stroke'; } echo ''; @@ -1419,7 +1429,7 @@ class Heatmap echo ''; // Name. - echo ''.$name.''; $x_back = $x_position; @@ -1470,7 +1480,7 @@ class Heatmap echo ''; // Name. - echo ''.$name.''; // Bottom-right of last line. @@ -1527,7 +1537,7 @@ class Heatmap echo ''; // Name. - echo ''.$name.''; // Bottom-top of last line. diff --git a/pandora_console/include/styles/heatmap.css b/pandora_console/include/styles/heatmap.css index 69a2832fe0..34df84e1c1 100644 --- a/pandora_console/include/styles/heatmap.css +++ b/pandora_console/include/styles/heatmap.css @@ -185,8 +185,6 @@ .hover:hover { filter: brightness(1.5); - stroke-width: 0.009; - stroke: black; } .group { @@ -272,19 +270,43 @@ div#heatmap-controls div.heatmap-refr > div { } .small-stroke { - stroke-width: 0.03; + stroke-width: 0.005; +} + +.tiny-stroke { + stroke-width: 0.01; +} + +.medium-stroke { + stroke-width: 0.02; } .big-stroke { - stroke-width: 0.05; + stroke-width: 0.03; +} + +.huge-stroke { + stroke-width: 0.04; } .small-size { - font-size: 0.2px; + font-size: 1%; +} + +.tiny-size { + font-size: 2%; +} + +.medium-size { + font-size: 4%; } .big-size { - font-size: 0.4px; + font-size: 6%; +} + +.huge-size { + font-size: 8%; } .progress_main {