コード例 #1
0
        private PieChartData GetPieChartData(AgeInformation ageInformation)
        {
            PieChartData pieChartData = new PieChartData();

            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "< 14 лет", Value = ageInformation.Below14
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "15-24 года", Value = ageInformation.Upper15Below24
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "25-34 года", Value = ageInformation.Upper25Below34
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "35-44 года", Value = ageInformation.Upper35Below44
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "45-54 года", Value = ageInformation.Upper45Below54
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "> 55 лет", Value = ageInformation.Upper55
            });
            pieChartData.AddItem(new PieChartDataItem()
            {
                Label = "Не указано", Value = ageInformation.Unknown
            });

            return(pieChartData);
        }
コード例 #2
0
        public PieChartData GetPieChartDataActiveUsers(int projectId, IList <ActiveUserInfo> usersList)
        {
            var            ageActiveUsers    = this.searchService.GetAgeActiveUsers(projectId, usersList, false);
            AgeInformation genderInformation = AgeInformation.Create(ageActiveUsers);

            return(this.GetPieChartData(genderInformation));
        }
コード例 #3
0
        public PieChartData GetPieChartDataActiveUsersWithoutMonthAndDay(int projectId, long filterCode)
        {
            var            ageActiveUsers    = this.searchService.GetAgeActiveUsers(projectId, filterCode, true);
            AgeInformation genderInformation = AgeInformation.Create(ageActiveUsers);

            return(this.GetPieChartData(genderInformation));
        }
コード例 #4
0
ファイル: MetricsService.cs プロジェクト: Ishitori/Palantir
 public AgeInformation GetAgeInformation(int projectId)
 {
     using (this.unitOfWorkProvider.CreateUnitOfWork())
     {
         CategorialValue categories = this.statisticsProvider.GetAgeInformation(projectId);
         return(AgeInformation.Create(categories));
     }
 }
コード例 #5
0
        public PieChartData GetPieChartData(int projectId)
        {
            AgeInformation genderInformation = this.statisticsProvider.GetAgeInformation(projectId);

            return(this.GetPieChartData(genderInformation));
        }