8000 different ntick setup when axis has weekend pattern · Franciraldo/plotly.js@7a2ca15 · GitHub
[go: up one dir, main page]

8000 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
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) 8000 ;
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