/// <summary> /// Initializes the chart information /// </summary> public virtual void InitializeChartInfos() { var chartHelper = new ChartHelper<GamingSession>(); this.ChartIntervalType = chartHelper.ComputeIntervalType(this.GamingSessions); var chartSessions = chartHelper.ExtractChartSessions(this.GamingSessions, this.ChartIntervalType); this.FirstChartDate = chartSessions.Count == 0 ? DateTime.Today : chartSessions.Keys.Min(); this.GamingSessionForCharts = chartHelper.ComputeSessionsChart(chartSessions); this.GamingSessionXAxisTicks = chartHelper.ComputeXAxisTicks(chartSessions); this.GamingSessionYAxisTicks = chartHelper.ComputeYAxisTicks(chartSessions); }
/// <summary> /// Initializes the chart information /// </summary> public virtual void InitializeChartInfos() { var chartHelper = new ChartHelper<TvWatchingSession>(); var watchingSessions = this.Seasons.SelectMany(x => x.Episodes).SelectMany(x => x.WatchingSessions).ToList(); this.ChartIntervalType = chartHelper.ComputeIntervalType(watchingSessions); var chartSessions = chartHelper.ExtractChartSessions(watchingSessions, this.ChartIntervalType); this.FirstChartDate = chartSessions.Count == 0 ? DateTime.Today : chartSessions.Keys.Min(); this.WatchingSessionForCharts = chartHelper.ComputeSessionsChart(chartSessions); this.WatchingSessionXAxisTicks = chartHelper.ComputeXAxisTicks(chartSessions); this.WatchingSessionYAxisTicks = chartHelper.ComputeYAxisTicks(chartSessions); }