Skip to content

Commit

Permalink
fixes metrics options matching (#10865)
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar authored Mar 24, 2017
1 parent d8ab1c2 commit eb240ed
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ module.directive('vislibSeries', function () {
});

// update labels for existing params or create new one
$scope.vis.params.seriesParams = metrics.map((agg, i) => {
const params = $scope.vis.params.seriesParams[i];
$scope.vis.params.seriesParams = metrics.map(agg => {
const params = $scope.vis.params.seriesParams.find(param => param.data.id === agg.id);
if (params) {
params.data.id = agg.id;
params.data.label = agg.makeLabel();
return params;
} else {
Expand Down

0 comments on commit eb240ed

Please sign in to comment.