Skip to content

Commit f822602

Browse files
committed
fix labels on weekend breaks
1 parent 79b6d95 commit f822602

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

src/plots/cartesian/axes.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -807,12 +807,8 @@ axes.autoTicks = function(ax, roughDTick) {
807807
roughDTick /= ONEAVGMONTH;
808808
ax.dtick = 'M' + roundDTick(roughDTick, 1, roundBase24);
809809
} else if(roughX2 > ONEDAY) {
810-
if(ax._hasDayOfWeekBreaks) {
811-
ax.dtick = roundDTick(roughDTick, ONEDAY, [1, 1.001, 7, 14]);
812-
if(ax.dtick < ONEWEEK) ax.dtick = ONEWEEK;
813-
} else {
814-
ax.dtick = roundDTick(roughDTick, ONEDAY, roundDays);
815-
}
810+
ax.dtick = roundDTick(roughDTick, ONEDAY, roundDays);
811+
if(ax._hasDayOfWeekBreaks && ax.dtick < ONEWEEK) ax.dtick = ONEDAY;
816812

817813
// get week ticks on sunday
818814
// this will also move the base tick off 2000-01-01 if dtick is
Loading
Loading

0 commit comments

Comments
 (0)