[Console > Module area graph] Now the Y legend values are rounded properly to 2 dec when 'Shortened module graph data' is enabled
This commit is contained in:
parent
3bc4bdb798
commit
b431f4afd3
|
@ -2158,9 +2158,8 @@ function number_format(number, force_integer, unit) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
var decimals = 2;
|
||||
var factor = 10 * decimals;
|
||||
number = Math.round(number*factor)/factor;
|
||||
// Round to 2 decimals
|
||||
number = Math.round(number * 100) / 100;
|
||||
}
|
||||
|
||||
var shorts = ["", "K", "M", "G", "T", "P", "E", "Z", "Y"];
|
||||
|
@ -2174,10 +2173,6 @@ function number_format(number, force_integer, unit) {
|
|||
pos++;
|
||||
number = number / 1000;
|
||||
}
|
||||
else if (number <= -1000) {
|
||||
pos++;
|
||||
number = number / 1000;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue