From 0b526d47e2c161a84a81672dc507288cc10c534f Mon Sep 17 00:00:00 2001 From: ebb-tide Date: Fri, 8 Jun 2018 10:06:24 -0700 Subject: [PATCH] Add isGroupBy field to series that have groupby --- ui/src/utils/groupByTimeSeriesTransform.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/src/utils/groupByTimeSeriesTransform.ts b/ui/src/utils/groupByTimeSeriesTransform.ts index 4fb2474dd9..3309f17bb0 100644 --- a/ui/src/utils/groupByTimeSeriesTransform.ts +++ b/ui/src/utils/groupByTimeSeriesTransform.ts @@ -89,6 +89,7 @@ const flattenGroupBySeries = ( }, ], responseIndex, + isGroupBy: true, }, ] @@ -142,10 +143,11 @@ const constructResults = ( const constructSerieses = (results: Result[]): Series[] => { return _.flatten( - fastMap(results, ({series, responseIndex}) => + fastMap(results, ({series, responseIndex, isGroupBy}) => fastMap(series, (s, index) => ({ ...s, responseIndex, + isGroupBy, seriesIndex: index, })) )