|
|
@ -59,7 +59,9 @@ DataScale.prototype.determineScale = function () { |
|
|
|
var range = this._end - this._start; |
|
|
|
this.scale = this.containerHeight / range; |
|
|
|
var minimumStepValue = this.majorCharHeight / this.scale; |
|
|
|
var orderOfMagnitude = Math.round(Math.log(range) / Math.LN10); |
|
|
|
var orderOfMagnitude = (range > 0) |
|
|
|
? Math.round(Math.log(range) / Math.LN10) |
|
|
|
: 0; |
|
|
|
|
|
|
|
this.minorStepIdx = -1; |
|
|
|
this.magnitudefactor = Math.pow(10, orderOfMagnitude); |
|
|
|