Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Bug 1447965 - Scale chart units using average instead of low value.
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvp8510 committed Sep 1, 2017
1 parent 95eea35 commit 88f4c1b
Showing 1 changed file with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,21 +365,9 @@ public String getJsonMetrics() {

calculateOOB();

// find the lowest value and use it's UOM to translated everything else into
MeasurementDataNumericHighLowComposite lowestValue = null;
for (MeasurementDataNumericHighLowComposite measurement : metricData) {
if (!Double.isNaN(measurement.getValue())) {
if (null == lowestValue) {
lowestValue = measurement;
}
if (measurement.getLowValue() < lowestValue.getLowValue()) {
lowestValue = measurement;
}
}
}
if (null != lowestValue) {
if (0.0 != average) {
MeasurementNumericValueAndUnits adjustedMeasurementUnitsAndValue = MeasurementConverterClient.fit(
lowestValue.getLowValue(), definition.getUnits());
average, definition.getUnits());
adjustedMeasurementUnits = adjustedMeasurementUnitsAndValue.getUnits();
} else {
adjustedMeasurementUnits = definition.getUnits();
Expand Down

0 comments on commit 88f4c1b

Please sign in to comment.