private void MapGovernanceControlsByMaturityLevel(List <GovernanceControlEntity> governanceControlEntities, Dashboard dashboard) { var highchart = new Highchart(); var series = new Series { Type = "pie", Name = "Maturity Level" }; var governanceControlGroups = governanceControlEntities.OrderBy(gc => gc.CmmiStatusId).GroupBy(gc => CmmiStatus.LookupByValue(gc.CmmiStatusId)).ToList(); foreach (var governanceControlGroup in governanceControlGroups) { var data = new Data { Name = governanceControlGroup.Key.Name, Value = governanceControlGroup.Count(), Color = governanceControlGroup.Key.Color }; series.Data.Add(data); } highchart.Series.Add(series); dashboard.GovernanceControlsByMaturityLevel = highchart; }
private void MapComplianceByMaturityLevel(List <ComplianceEntity> complianceEntities, ComplianceSchemeEntity scheme, Dashboard dashboard) { var highchart = new Highchart(); var series = new Series { Type = "pie", Name = "Maturity Level" }; var maturityLevelGroups = complianceEntities.OrderBy(x => x.CmmiStatusId).GroupBy(gc => CmmiStatus.LookupByValue(gc.CmmiStatusId)).ToList(); foreach (var maturityLevelGroup in maturityLevelGroups) { var data = new Data { Name = maturityLevelGroup.Key.Name, Value = maturityLevelGroup.Count(), Color = maturityLevelGroup.Key.Color }; series.Data.Add(data); } highchart.Series.Add(series); dashboard.ComplianceByMaturityLevel[scheme.Id] = highchart; }