Skip to content

Commit 7a2ca15

Browse files
committed
different ntick setup when axis has weekend pattern
1 parent f822602 commit 7a2ca15

File tree

4 files changed

+2
-2
lines changed

4 files changed

+2
-2
lines changed

src/plots/cartesian/axes.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ axes.prepTicks = function(ax) {
514514
minPx = ax.tickfont ? (ax.tickfont.size || 12) * 1.2 : 15;
515515
nt = ax._length / minPx;
516516
} else {
517-
minPx = ax._id.charAt(0) === 'y' ? 40 : 80;
517+
minPx = ax._hasDayOfWeekBreaks ? 40 : ax._id.charAt(0) === 'y' ? 40 : 80;
518518
nt = Lib.constrain(ax._length / minPx, 4, 9) + 1;
519519
}
520520

@@ -808,7 +808,7 @@ axes.autoTicks = function(ax, roughDTick) {
808808
ax.dtick = 'M' + roundDTick(roughDTick, 1, roundBase24);
809809
} else if(roughX2 > ONEDAY) {
810810
ax.dtick = roundDTick(roughDTick, ONEDAY, roundDays);
811-
if(ax._hasDayOfWeekBreaks && ax.dtick < ONEWEEK) ax.dtick = ONEDAY;
811+
if(ax._hasDayOfWeekBreaks && ax.dtick < ONEWEEK) ax.dtick = ONEWEEK;
812812

813813
// get week ticks on sunday
814814
// this will also move the base tick off 2000-01-01 if dtick is
6.3 KB
Loading
Loading
Loading

0 commit comments

Comments
 (0)