From 118cc5ed34878f3cf80874a11e845b8d6c820727 Mon Sep 17 00:00:00 2001 From: "daniele.corsini@corsinvest.it" Date: Fri, 23 Jun 2023 17:14:30 +0200 Subject: [PATCH] Fix dark theme label --- .../Components/DataAnalysis.razor | 4 ++-- .../Components/DataAnalysis.razor.cs | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/Corsinvest.ProxmoxVE.Admin.VzDumpTrend/Components/DataAnalysis.razor b/src/Corsinvest.ProxmoxVE.Admin.VzDumpTrend/Components/DataAnalysis.razor index be67ede..f6e85c8 100644 --- a/src/Corsinvest.ProxmoxVE.Admin.VzDumpTrend/Components/DataAnalysis.razor +++ b/src/Corsinvest.ProxmoxVE.Admin.VzDumpTrend/Components/DataAnalysis.razor @@ -64,7 +64,7 @@
- diff --git a/src/Corsinvest.ProxmoxVE.Admin.VzDumpTrend/Components/DataAnalysis.razor.cs b/src/Corsinvest.ProxmoxVE.Admin.VzDumpTrend/Components/DataAnalysis.razor.cs index f5772aa..49e7488 100644 --- a/src/Corsinvest.ProxmoxVE.Admin.VzDumpTrend/Components/DataAnalysis.razor.cs +++ b/src/Corsinvest.ProxmoxVE.Admin.VzDumpTrend/Components/DataAnalysis.razor.cs @@ -5,6 +5,7 @@ using ApexCharts; using Ardalis.Specification; using Corsinvest.AppHero.Core.Domain.Repository; +using Corsinvest.AppHero.Core.MudBlazorUI.Style; using Corsinvest.ProxmoxVE.Admin.Core.Services; using Corsinvest.ProxmoxVE.Admin.VzDumpTrend.Repository; using Corsinvest.ProxmoxVE.Api.Shared.Utils; @@ -16,8 +17,9 @@ public partial class DataAnalysis { [Inject] private IReadRepository VzDumpDetails { get; set; } = default!; [Inject] private IPveClientService PveClientService { get; set; } = default!; + [Inject] private LayoutService LayoutService { get; set; } = default!; - private static ApexChartOptions Options1 => new() + private ApexChartOptions Options1 => new() { Markers = new() { @@ -25,10 +27,11 @@ public partial class DataAnalysis Size = 5, FillOpacity = new Opacity(0.8d), }, - Yaxis = new() { new YAxis { DecimalsInFloat = 0 } } + Yaxis = new() { new YAxis { DecimalsInFloat = 0 } }, + Theme = new() { Mode = LayoutService.IsDarkMode ? Mode.Dark : Mode.Light } }; - private static ApexChartOptions Options2 => new() + private ApexChartOptions Options2 => new() { Markers = new() { @@ -36,10 +39,11 @@ public partial class DataAnalysis Size = 5, FillOpacity = new Opacity(0.8d), }, - Yaxis = new() { new YAxis { DecimalsInFloat = 0 } } + Yaxis = new() { new YAxis { DecimalsInFloat = 0 } }, + Theme = new() { Mode = LayoutService.IsDarkMode ? Mode.Dark : Mode.Light } }; - private static ApexChartOptions Options3 => new() + private ApexChartOptions Options3 => new() { Markers = new() { @@ -47,7 +51,8 @@ public partial class DataAnalysis Size = 5, FillOpacity = new Opacity(0.8d), }, - Yaxis = new() { new YAxis { DecimalsInFloat = 0 } } + Yaxis = new() { new YAxis { DecimalsInFloat = 0 } }, + Theme = new() { Mode = LayoutService.IsDarkMode ? Mode.Dark : Mode.Light } }; class Data