mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Separate each statistics pie chart into an independent component, fixes rendering crashes.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
@using Aaru.CommonTypes.Metadata
|
||||
@using Aaru.Server.Database
|
||||
@using Blazorise
|
||||
@using Blazorise.Charts
|
||||
@using Blazorise.DataGrid
|
||||
@rendermode InteractiveServer
|
||||
|
||||
@inject Microsoft.EntityFrameworkCore.IDbContextFactory<DbContext> DbContextFactory
|
||||
|
||||
@*
|
||||
TODO: Group by datagrid
|
||||
*@
|
||||
|
||||
<h1>
|
||||
<p class="text-center" style="color: deeppink;">All operating systems Aaru has run on...</p>
|
||||
</h1>
|
||||
<Carousel @ref="_operatingSystemsCarousel">
|
||||
<CarouselSlide Name="1">
|
||||
<PieChart @ref="_operatingSystemsChart" style="padding: 40px" TItem="long"/>
|
||||
</CarouselSlide>
|
||||
<CarouselSlide Name="2">
|
||||
<PieChart @ref="_linuxChart" style="padding: 40px" TItem="long"/>
|
||||
</CarouselSlide>
|
||||
<CarouselSlide Name="3">
|
||||
<PieChart @ref="_macosChart" style="padding: 40px" TItem="long"/>
|
||||
</CarouselSlide>
|
||||
<CarouselSlide Name="4">
|
||||
<PieChart @ref="_windowsChart" style="padding: 40px" TItem="long"/>
|
||||
</CarouselSlide>
|
||||
</Carousel>
|
||||
<DataGrid Data="@OperatingSystemsList" FixedHeader FixedHeaderDataGridMaxHeight="300px" PageSize="int.MaxValue" TItem="NameValueStats">
|
||||
<DataGridColumn Caption="Name" Field="@nameof(NameValueStats.name)"/>
|
||||
<DataGridNumericColumn Caption="Times" Field="@nameof(NameValueStats.Value)"/>
|
||||
</DataGrid>
|
||||
Reference in New Issue
Block a user