From 958e4c8fcef0fa00c10920e336457b0419693f9b Mon Sep 17 00:00:00 2001 From: jason-dutton Date: Thu, 26 Oct 2023 01:42:58 +0200 Subject: [PATCH] Added legend to calculation page pie chart --- .../Components/Advanced/BuildYourHome.razor | 28 +++++++++++++------ src/apps/blazor-app/wwwroot/css/app.css | 24 ++++++++++++++++ 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/src/apps/blazor-app/Components/Advanced/BuildYourHome.razor b/src/apps/blazor-app/Components/Advanced/BuildYourHome.razor index 3874f852..8adfe115 100644 --- a/src/apps/blazor-app/Components/Advanced/BuildYourHome.razor +++ b/src/apps/blazor-app/Components/Advanced/BuildYourHome.razor @@ -221,7 +221,7 @@
@if (systems.Count > 0) { -
+
@@ -255,28 +255,38 @@ }
-
+

@tooltipService.GetTooltip("running hours on batteries")

Running Hours on Batteries

-
-
+
+
@if(float.IsInfinity(dlh) || dlh == 99) { string hexColor = calculationDataHandler.GetColorGradient(99); - @* ToDo: Implement the hexColor Here too *@ - +

99+

} else { - string hexColor = calculationDataHandler.GetColorGradient(99); - @* ToDo: Implement the hexColor Here too *@ - + string hexColor = calculationDataHandler.GetColorGradient(dlh); +

@dlh

}

h

+
+ @if(float.IsInfinity(concurrentRuntime) || dlh == 99) { + string hexColorConcurrent = calculationDataHandler.GetColorGradient(99, 4); +
+

99+

+ } else { + string hexColorConcurrent = calculationDataHandler.GetColorGradient(concurrentRuntime, 4); +
+

@concurrentRuntime

+ } +

h

+
diff --git a/src/apps/blazor-app/wwwroot/css/app.css b/src/apps/blazor-app/wwwroot/css/app.css index b7748484..d19e7d40 100644 --- a/src/apps/blazor-app/wwwroot/css/app.css +++ b/src/apps/blazor-app/wwwroot/css/app.css @@ -1525,6 +1525,18 @@ video { max-height: 24rem; } +.max-h-32 { + max-height: 8rem; +} + +.max-h-6 { + max-height: 1.5rem; +} + +.max-h-60 { + max-height: 15rem; +} + .w-1\/2 { width: 50%; } @@ -4572,6 +4584,18 @@ html { width: 100%; } + .md\:w-24 { + width: 6rem; + } + + .md\:w-\[360px\] { + width: 360px; + } + + .md\:w-\[470px\] { + width: 470px; + } + .md\:flex-shrink-0 { flex-shrink: 0; }