Commit 658ff73a authored by Mathieu Giraud's avatar Mathieu Giraud

js/numerical_axis.js: nice_number_digits was already defined elsewhere

See 62eefb1d and 71be5c3b, and #2731.
parent 9c9ac524
Pipeline #11003 passed with stages
in 9 minutes and 49 seconds
......@@ -279,7 +279,7 @@ function FloatAxis (model, reverse, can_undefined) {
FloatAxis.prototype = Object.create(NumericalAxis.prototype);
FloatAxis.prototype.getLabelText = function(value) {
return parseFloat(value).toFixed( this.nice_number_digits(this.min, this.max) )
return parseFloat(value).toFixed( nice_number_digits(this.min, this.max, 2) )
}
FloatAxis.prototype.insert_values = function() {
......@@ -305,10 +305,3 @@ FloatAxis.prototype = Object.create(NumericalAxis.prototype);
this.value_mapping = temp
}
FloatAxis.prototype.nice_number_digits = function(min, max) { //max - min, 2){
var exposant = 0
while (max - min < Math.pow(10, exposant) ) {
exposant--;
}
return exposant
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment