diff --git a/Btms.Analytics/ImportNotificationsAggregationService.cs b/Btms.Analytics/ImportNotificationsAggregationService.cs index 6dfde720..26ed8f30 100644 --- a/Btms.Analytics/ImportNotificationsAggregationService.cs +++ b/Btms.Analytics/ImportNotificationsAggregationService.cs @@ -72,8 +72,6 @@ public Task ByCommodityCount(DateTime from, DateTime to) .GroupBy(r => new { r.Key.ImportNotificationType, r.Key.Linked }) .ToList(); - // var maxCommodities = result.Max(r => r.Max(i => i.Key.CommodityCount)); - var maxCommodities = result.Count > 0 ? result.Max(r => r.Any() ? r.Max(i => i.Key.CommodityCount) : 0) : 0; @@ -107,32 +105,7 @@ public Task ByCommodityCount(DateTime from, DateTime to) }).ToList() }) .ToList() - // .AsOrderedArray(d => d.Name) - }); - - // return Task.FromResult( - // AnalyticsHelpers.GetImportNotificationSegments() - // .Select(title => new MultiSeriesDataset(title, "ItemCount") - // { - // // Results = asDictionary.AsResultList(title, maxCommodities) - // Series = - // [ - // new Series() - // { - // Results = Enumerable.Range(0, maxCommodities) - // .Select(i => new ByNumericDimensionResult - // { - // Dimension = i, - // Value = asDictionary.GetValueOrDefault(new { Title=title, CommodityCount = i }) - // }).ToList() - // } - // ] - // - // } - // ) - // .AsOrderedArray(d => d.Name) - // ); } private Task Aggregate(DateTime[] dateRange, Func createDatasetName, Expression> filter, string dateField, AggregationPeriod aggregateBy) diff --git a/Btms.Backend/Config/AnalyticsDashboards.cs b/Btms.Backend/Config/AnalyticsDashboards.cs index 452712cd..df25f6ae 100644 --- a/Btms.Backend/Config/AnalyticsDashboards.cs +++ b/Btms.Backend/Config/AnalyticsDashboards.cs @@ -81,14 +81,11 @@ public static async Task> GetCharts( await Task.WhenAll(taskList.Select(r => r.Value)); var output = taskList - // .Select(t => t.Value.Result) .ToDictionary(t => t.Key, t => t.Value.Result); logger.LogInformation("Results found {0} Datasets, {1}", output.Count, output.Keys); return output; - // return output.ToList(); - } } \ No newline at end of file