using Microsoft.AspNetCore.Components; using Plotly.Blazor; using Plotly.Blazor.Traces; using Schaad.Accounting.Interfaces; namespace Schaad.Accounting.UI.Components.Pages.Charts; public partial class BookingTextBreakdown : ComponentBase { private PlotlyChart chart = null!; private Config? config; private Plotly.Blazor.Layout? layout; private IList? data; [Parameter, EditorRequired] public string AccountId { get; set; } = null!; [Inject] private IChartService chartService { get; set; } = null!; protected override async Task OnInitializedAsync() { config = ChartTheme.BaseConfig(); layout = ChartTheme.BaseLayout("Nach Buchungstext"); var totals = await chartService.GetBookingTextTotalsAsync(AccountId); data = new List { ChartTheme.BuildDonutTrace(ChartFormatting.FoldTail(totals)) }; } }