Commit 43f0e167 authored by Mathieu Giraud's avatar Mathieu Giraud

js/numerical_axis.js: more robust, sets .nb_steps_normal in each case

parent 6b5e045b
......@@ -95,9 +95,11 @@ NumericalAxis.prototype = Object.create(GenericAxis.prototype);
if (typeof min == "undefined"){
min = 0;
max = 1;
this.nb_steps_normal = 1
}
else if (typeof max === 'undefined') {
else if (typeof max == 'undefined') {
max = min + 1;
this.nb_steps_normal = 1
} else {
if (use_log)
{
......@@ -110,10 +112,11 @@ NumericalAxis.prototype = Object.create(GenericAxis.prototype);
min = nice.min
max = nice.max
this.nb_steps_normal = nice.nb_steps
this.nb_steps = this.nb_steps_normal + this.nb_steps_special
}
}
this.nb_steps = this.nb_steps_normal + this.nb_steps_special
if (this.can_undefined && ! use_log) {
max = max + (max - min) / (this.nb_steps_normal)
}
......
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