mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-23 19:30:06 +02:00
feat: added charts by tank type
This commit is contained in:
1 parent
d75fff58c7
commit
73bbe3cd14
9 files changed
+499
-23
No files matched your search
@@ -26,7 +26,7 @@
|
||||
<PlayerInfoOverview AccountInfo="@AccountInfo"></PlayerInfoOverview>
|
||||
</RadzenTabsItem>
|
||||
<RadzenTabsItem Icon="insights">
|
||||
<PlayerInfoStatistics></PlayerInfoStatistics>
|
||||
<PlayerInfoStatistics TanksList="@AccountInfo.Tanks"></PlayerInfoStatistics>
|
||||
</RadzenTabsItem>
|
||||
<RadzenTabsItem Icon="agriculture">
|
||||
<PlayerInfoTanksList TanksList="@AccountInfo.Tanks"></PlayerInfoTanksList>
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
@inherits PlayerInfoStatisticsBase
|
||||
|
||||
<div id="main" style="width:600px; height:400px;"></div>
|
||||
<div class="chartsRow">
|
||||
<div id="battlesByTankType" style="width: 33%; min-width: 300px; height:300px; margin-top: 10px;"></div>
|
||||
<div id="winRateByTankType" style="width: 33%; min-width: 300px; height: 300px; margin-top: 10px; "></div>
|
||||
<div id="avgDmgByTankType" style="width: 33%; min-width: 300px; height: 300px; margin-top: 10px; "></div>
|
||||
</div>
|
||||
@*<div id="stacked" style="width:300px; height:500px; margin-top: 20px"></div>*@
|
||||
@@ -0,0 +1,6 @@
|
||||
.chartsRow {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Pages
|
||||
@@ -9,11 +11,19 @@ namespace WotBlitzStatisticsPro.Blazor.Pages
|
||||
[Inject]
|
||||
public IChartsService ChartsService { get; set; }
|
||||
|
||||
|
||||
[Parameter]
|
||||
public IEnumerable<ITank> TanksList { get; set; }
|
||||
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
await ChartsService.BuildBarChart("main");
|
||||
await ChartsService.BuildBarChartBattlesByTankType("battlesByTankType", TanksList);
|
||||
await ChartsService.BuildBarChartWinRatesByTankType("winRateByTankType", TanksList);
|
||||
await ChartsService.BuildBarChartAvgDmgByTankType("avgDmgByTankType", TanksList);
|
||||
//await ChartsService.BuildStackedBarChart("stacked");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user