Skip to content

Commit

Permalink
Merge pull request ManageIQ#11762 from PanSpagetka/fix-chart-ylabels
Browse files Browse the repository at this point in the history
Fix Y label on chart with close range of values
  • Loading branch information
Dan Clarizio committed Oct 21, 2016
2 parents fbaff3d + be6d723 commit 88a7546
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/assets/javascripts/miq_formatters.js
Expand Up @@ -77,10 +77,10 @@

function number_to_human_size(val, options) {
var fmt = "0.0";
if (options.precision < 2) {
if (options.precision < 1) {
fmt = "0";
} else {
var p = options.precision - 2;
var p = options.precision - 1;
while (p > 0) {
fmt += '0';
}
Expand Down Expand Up @@ -131,7 +131,7 @@

bytes_to_human_size: function(val, options) {
options = options || {};
var av_options = { precision: options.precision || 0 }; // Precision of 0 returns the significant digits
var av_options = { precision: options.precision || 1 }; // Precision of 0 returns the significant digits
val = number_to_human_size(val, av_options);
return apply_prefix_and_suffix(val, options);
},
Expand Down

0 comments on commit 88a7546

Please sign in to comment.