Commit 1277fb8f authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-c/2731-nice_number_digits' into 'dev'

numericalAxis: use nice_number_digits in FloatAxis

Closes #2731

See merge request !124
parents d9b8d851 658ff73a
Pipeline #11008 passed with stages
in 13 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(2)
return parseFloat(value).toFixed( nice_number_digits(this.min, this.max, 2) )
}
FloatAxis.prototype.insert_values = function() {
......@@ -303,4 +303,5 @@ FloatAxis.prototype = Object.create(NumericalAxis.prototype);
temp[key] = this.value_mapping[key]
}
this.value_mapping = temp
}
\ 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