Skip to content

Commit

Permalink
Fix display when using Sum/Max/Min/Avg Bucket on Metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
dlumbrer committed Jan 14, 2019
1 parent 9a93312 commit 7b26918
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions public/kbn_radar_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,24 +48,18 @@ module.controller('KbnRadarVisController', function ($scope, $element, $timeout,

// Retrieve the metrics aggregation configured
if($scope.vis.aggs.bySchemaName['vertex']){
var fields = []
var titles = []
var customLabels = []
var quantityVertices = $scope.vis.aggs.bySchemaName['vertex'].length;
for (let index = 0; index < $scope.vis.aggs.bySchemaName['vertex'].length; index++) {
const metric = $scope.vis.aggs.bySchemaName['vertex'][index];

if (metric.type.name != "count") {
fields.push(metric.params.field.displayName)
} else {
fields.push("")
}
titles.push(metric.type.title)

if (metric.params.customLabel) {
customLabels.push(metric.params.customLabel)
} else {
customLabels.push(metric.type.title + " " + fields[fields.length-1])
customLabels.push(metric.type.title)
}
}
}
Expand Down

0 comments on commit 7b26918

Please sign in to comment.