Fix display pareto: usa conteggio se non usate licenze
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user