Skip to content

Commit

Permalink
Make sure to flip the high and low for carbon avoided
Browse files Browse the repository at this point in the history
The *low* range of the carbon avoided = worst - *high* range of the carbon used
  • Loading branch information
shankari committed Jan 21, 2022
1 parent 2ccbe6a commit f953a3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions www/js/metrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -832,8 +832,8 @@ angular.module('emission.main.metrics',['nvd3',
// $scope.carbonData.optimalCarbon = FootprintHelper.getLowestFootprintForDistance(optimalDistance);
$scope.carbonData.worstCarbon = FootprintHelper.getHighestFootprintForDistance(worstDistance);
$scope.carbonData.carbonAvoided = {
low: $scope.carbonData.worstCarbon - $scope.carbonData.userCarbon.low,
high: $scope.carbonData.worstCarbon - $scope.carbonData.userCarbon.high,
low: $scope.carbonData.worstCarbon - $scope.carbonData.userCarbon.high,
high: $scope.carbonData.worstCarbon - $scope.carbonData.userCarbon.low,
};
}

Expand Down

0 comments on commit f953a3e

Please sign in to comment.