diff --git a/LiMan.UI/Components/InstAppPareto.razor.cs b/LiMan.UI/Components/InstAppPareto.razor.cs index a1ffc57..6d4db72 100644 --- a/LiMan.UI/Components/InstAppPareto.razor.cs +++ b/LiMan.UI/Components/InstAppPareto.razor.cs @@ -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)