Skip to content

Commit

Permalink
sorted data by date (#385)
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <[email protected]>

Signed-off-by: Amardeepsingh Siglani <[email protected]>
  • Loading branch information
amsiglan authored Dec 2, 2022
1 parent a4f8bd0 commit c117f3f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export function getDataFromResponse(response, fieldName, monitorType) {
const buckets = _.get(response, 'aggregations.composite_agg.buckets', []);
return buckets
.map((bucket) => getXYValuesByFieldName(bucket, fieldName))
.filter(filterInvalidYValues);
.filter(filterInvalidYValues)
.sort((a, b) => a.x - b.x);
}
}

Expand Down

0 comments on commit c117f3f

Please sign in to comment.