Fix display pareto: usa conteggio se non usate licenze

This commit is contained in:
Samuele Locatelli
2025-01-15 12:49:39 +01:00
parent 0ef65b3cff
commit 38cbf40ad2
+12 -1
View File
@@ -27,11 +27,22 @@ namespace LiMan.UI.Components
protected override void OnParametersSet()
{
ListRecord = CurrRecord.DetailInstalled.OrderByDescending(x => x.VersNumInstall).ToList();
// sistemo info x grafico...
// sistemo info x grafico... se ho impieghi uso quello, altrimenti istanze...
if(CurrRecord.NumImp>0)
{
ChartData = ListRecord
.GroupBy(x => x.VersNumInstall)
.Select(g => (double)g.Sum(x => x.NumImp))
.ToArray();
}
else
{
ChartData = ListRecord
.GroupBy(x => x.VersNumInstall)
.Select(g => (double)g.Count())
.ToArray();
}
ChartLabels = ListRecord
.GroupBy(x => x.VersNumInstall)
.Select(g => g.Key)