private async Task Update() { var stateFiltering = await _stateFilteringProvider.GetStateFilteringParameter(); var stories = (await _source.GetStories(_currentProject.ProjectKey, stateFiltering)).ToArray(); var fromDate = stories.Where(x => x.Ended.HasValue).Max(x => x.Ended.Value).AddMonths(-3); var cfa = new CumulativeFlowAnalysis(stories, stateFiltering.FilteredStates, fromDate); SeriesCollection.Clear(); foreach (var state in cfa.States) { SeriesCollection.Add(new StackedAreaSeries { Title = state, Values = new ChartValues <DateTimePoint>(), LineSmoothness = 0 }); } foreach (var change in cfa.Changes) { for (int i = 0; i < cfa.States.Length; i++) { SeriesCollection[i].Values.Add(new DateTimePoint(change.Date, change.StateCounts[i])); } } }
private async Task Update() { Issues.Clear(); var stateFilteringParameter = await _stateFilteringProvider.GetStateFilteringParameter(); var allIssues = await _tasksSource.GetAllIssues(_currentProject.ProjectKey, stateFilteringParameter); var mapper = new Mapper(new MapperConfiguration(cfg => { })); Issues.AddRange(allIssues.Select(issue => ToDynamicRow(issue, mapper))); }