var me = this;
var opts = me.options;
var tickOpts = opts.ticks;
+ var reverse = !me.isHorizontal();
var generationOptions = {
min: tickOpts.min,
};
var ticks = me.ticks = Ticks.generators.logarithmic(generationOptions, me);
- if (!me.isHorizontal()) {
- // We are in a vertical orientation. The top value is the highest. So reverse the array
- ticks.reverse();
- }
-
// At this point, we need to update our max and min given the tick values since we have expanded the
// range of the scale
me.max = helpers.max(ticks);
me.min = helpers.min(ticks);
if (tickOpts.reverse) {
- ticks.reverse();
-
+ reverse = !reverse;
me.start = me.max;
me.end = me.min;
} else {
me.start = me.min;
me.end = me.max;
}
+ if (reverse) {
+ ticks.reverse();
+ }
},
convertTicksToLabels: function() {
this.tickValues = this.ticks.slice();