Skip to content

Commit 0affe38

Browse files
committed
improve handling of minor case
1 parent 04c2364 commit 0affe38

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/plots/cartesian/axes.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ axes.prepTicks = function(ax, opts, isMinor) {
565565

566566
// add a couple of extra digits for filling in ticks when we
567567
// have explicit tickvals without tick text
568-
if(ax.tickmode === 'array') nt *= 100;
568+
if(ax.tickmode === 'array' && !isMinor) nt *= 100;
569569

570570

571571
ax._roughDTick = Math.abs(rng[1] - rng[0]) / nt;
@@ -578,7 +578,7 @@ axes.prepTicks = function(ax, opts, isMinor) {
578578
}
579579
}
580580

581-
if(ax.ticklabelmode === 'period') {
581+
if(ax.ticklabelmode === 'period' && !isMinor) {
582582
adjustPeriodDelta(ax);
583583
}
584584

@@ -827,10 +827,7 @@ axes.calcTicks = function calcTicks(ax, opts) {
827827
}
828828
}
829829

830-
axes.prepTicks(mockAx, opts,
831-
isMinor &&
832-
ax.tickmode !== 'array' // avoid dense grid when main axes has tickvals
833-
);
830+
axes.prepTicks(mockAx, opts, isMinor);
834831

835832
// now that we've figured out the auto values for formatting
836833
// in case we're missing some ticktext, we can break out for array ticks

test/image/baselines/h-colorbar03.png

1.9 KB
Loading

0 commit comments

Comments
 (0)