Browse Source

Fixed #1177: Fix custom range of slaved right axis.

codeClimate
Ludo Stellingwerff 8 years ago
parent
commit
12f1468ee7
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      lib/timeline/component/DataAxis.js

+ 2
- 4
lib/timeline/component/DataAxis.js View File

@ -354,9 +354,8 @@ DataAxis.prototype._redrawLabels = function () {
var orientation = this.options['orientation'];
// get the range for the slaved axis
var step;
var step, stepSize, rangeStart, rangeEnd;
if (this.master === false) {
var stepSize, rangeStart, rangeEnd, minimumStep;
if (this.zeroCrossing !== -1 && this.options.alignZeros === true) {
if (this.range.end > 0) {
stepSize = this.range.end / this.zeroCrossing; // size of one step
@ -374,14 +373,13 @@ DataAxis.prototype._redrawLabels = function () {
rangeStart = this.range.start;
rangeEnd = this.range.end;
}
minimumStep = this.stepPixels;
}
else {
// calculate range and step (step such that we have space for 7 characters per label)
minimumStep = this.props.majorCharHeight;
rangeStart = this.range.start;
rangeEnd = this.range.end;
}
var minimumStep = this.props.majorCharHeight;
this.step = step = new DataStep(
rangeStart,

Loading…
Cancel
Save