From 8d64a57095bec739d22b7e5995ce00f9fc4c813e Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Thu, 8 Sep 2022 16:11:17 +0200 Subject: [PATCH] chg: [periodic_notification] Added css rule --- app/View/Elements/Events/trending_summary.ctp | 60 ++++++++++--------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/app/View/Elements/Events/trending_summary.ctp b/app/View/Elements/Events/trending_summary.ctp index 2788b89fc..9605a654b 100644 --- a/app/View/Elements/Events/trending_summary.ctp +++ b/app/View/Elements/Events/trending_summary.ctp @@ -48,7 +48,7 @@ $canvasWidth = 600; $canvasHeight = 150; foreach (array_keys($chartData) as $tag) { $chartData[$tag][0] = [0, $canvasHeight - ($chartData[$tag][0] / $maxValue) * $canvasHeight]; - $chartData[$tag][1] = [$canvasWidth/2, $canvasHeight - ($chartData[$tag][1] / $maxValue) * $canvasHeight]; + $chartData[$tag][1] = [$canvasWidth / 2, $canvasHeight - ($chartData[$tag][1] / $maxValue) * $canvasHeight]; $chartData[$tag][2] = [$canvasWidth, $canvasHeight - ($chartData[$tag][2] / $maxValue) * $canvasHeight]; } @@ -113,42 +113,42 @@ if (!function_exists('computeLinePositions')) { - +
$coords) : ?> - + ', - $linePosition['left'], - $linePosition['top'], - $linePosition['width'], - $linePosition['angle'], - $colorForTags[$tag], - h($tag), - ); - } + if (!empty($previousCoord)) { + $linePosition = computeLinePositions($previousCoord[0], $previousCoord[1], $coord[0], $coord[1]); + echo sprintf( + '', + $linePosition['left'], + $linePosition['top'], + $linePosition['width'], + $linePosition['angle'], + $colorForTags[$tag], + h($tag), + ); + } ?>
- - - + + +
- +

@@ -209,11 +209,11 @@ if (!function_exists('computeLinePositions')) { - + @@ -297,4 +297,10 @@ if (!function_exists('computeLinePositions')) { height: 10px; border: 1px solid #000; } - + + .axis-label { + position: absolute; + white-space: nowrap; + translate: -50%; + } + \ No newline at end of file