Example #1
0
        /// ------------------------------------------------------------------------------------
        private void WriteStageChart()
        {
            var sessionsByStage = _statsViewModel.SessionInformant.GetSessionsCategorizedByStage()
                                  .Where(r => r.Key.Id != ComponentRole.kConsentComponentRoleId);

            var barInfoList = (sessionsByStage.Select(
                                   x => new ChartBarInfo(x.Key.Name, x.Value, x.Key.Color, x.Key.TextColor))).ToList();

            ChartBarInfo.CalculateBarSizes(barInfoList);
            var text = LocalizationManager.GetString("ProgressView.ByStagesHeadingText", "By Stages");

            WriteChartForList(text, barInfoList, null, false);
        }
Example #2
0
        /// ------------------------------------------------------------------------------------
        private void WriteChartByFieldPair(string chartHeading, string primaryField,
                                           string secondaryField, IDictionary <string, Color> colors, IDictionary <string, Color> textColors)
        {
            var outerList =
                _statsViewModel.SessionInformant.GetCategorizedSessionsFromDoubleKey(primaryField, secondaryField);

            var barInfoList = (from x in outerList
                               select new ChartBarInfo(x.Key, secondaryField, x.Value, colors, textColors))
                              .OrderBy(bi => bi.FieldValue).ToList();

            ChartBarInfo.CalculateBarSizes(barInfoList);
            WriteChartForList(chartHeading, barInfoList, colors, true);
        }