mirror of
https://gitlab.com/Hukuta47/cartrix.git
synced 2026-12-05 12:30:55 +00:00
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
@page "/"
|
|
@page "/Dashboard"
|
|
@using CartriX.Shared.DTOs.Report
|
|
@inject HttpClient httpClient
|
|
|
|
<RadzenCard Variant="Variant.Flat">
|
|
<RadzenStack>
|
|
<RadzenLabel />
|
|
<RadzenChart>
|
|
<RadzenAreaSeries Smooth="false"
|
|
Data="@dataPerPrinteds"
|
|
Interpolation="Interpolation.Spline"
|
|
CategoryProperty="DateString"
|
|
LineType="LineType.Solid"
|
|
ValueProperty="countPrinted"
|
|
Title="Страниц распечатано">
|
|
<RadzenCategoryAxis LabelRotation="45"/>
|
|
<RadzenLegend Visible="false"/>
|
|
<RadzenMarkers Visible="true" MarkerType="MarkerType.Auto"/>
|
|
<RadzenSeriesDataLabels Visible="@(dataPerPrinteds?.Any() ?? false)" />
|
|
</RadzenAreaSeries>
|
|
</RadzenChart>
|
|
</RadzenStack>
|
|
</RadzenCard>
|
|
|
|
|
|
@code {
|
|
List<OnlyDataPerPrinted>? dataPerPrinteds;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
var response = await httpClient.GetAsync("http://localhost:5197/api/Report/GetReportToDatePerCountPrinted");
|
|
dataPerPrinteds = JsonConvert.DeserializeObject<List<OnlyDataPerPrinted>>(await response.Content.ReadAsStringAsync());
|
|
|
|
dataPerPrinteds = dataPerPrinteds?.OrderBy(x => x.date).ToList();
|
|
}
|
|
} |