diff --git a/Schaad.Accounting.UI/Components/Pages/Electricity.razor b/Schaad.Accounting.UI/Components/Pages/Electricity.razor index d8cfcf7..47fa361 100644 --- a/Schaad.Accounting.UI/Components/Pages/Electricity.razor +++ b/Schaad.Accounting.UI/Components/Pages/Electricity.razor @@ -53,5 +53,11 @@ AriaLabel="Preis pro kWh für Netz, PV und Total über die Abrechnungsperioden" /> + + +
Gesamtkosten pro Periode
+ +
} diff --git a/Schaad.Accounting.UI/Components/Pages/Electricity.razor.cs b/Schaad.Accounting.UI/Components/Pages/Electricity.razor.cs index f5d799c..0fe2531 100644 --- a/Schaad.Accounting.UI/Components/Pages/Electricity.razor.cs +++ b/Schaad.Accounting.UI/Components/Pages/Electricity.razor.cs @@ -31,6 +31,7 @@ public partial class Electricity : ComponentBase private object barData = new(); private object lineData = new(); + private object costData = new(); protected override async Task OnInitializedAsync() { @@ -70,6 +71,15 @@ public partial class Electricity : ComponentBase unit = "CHF/kWh", axisDecimals = 2 }; + costData = new + { + labels, + series = new object[] + { + new { name = "Total", color = ChartTheme.ColorAt(2), values = source.Select(b => (decimal?)b.TotalChf).ToList(), width = 2 } + }, + unit = "CHF" + }; } private async Task AddAsync()