Skip to content

Commit c340efc

Browse files
committed
round dtick 2 to 7 on rangebreaks with day of week pattern
1 parent 7ad4317 commit c340efc

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

Diff for: src/plots/cartesian/axes.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -807,11 +807,7 @@ axes.autoTicks = function(ax, roughDTick) {
807807
ax.dtick = 'M' + roundDTick(roughDTick, 1, roundBase24);
808808
} else if(roughX2 > ONEDAY) {
809809
ax.dtick = roundDTick(roughDTick, ONEDAY, roundDays);
810-
811-
if(ax._hasDayOfWeekBreaks) {
812-
if(ax.dtick === 2 * ONEDAY) ax.dtick = ONEDAY;
813-
else if(ax.dtick === 3 * ONEDAY) ax.dtick = 7 * ONEDAY;
814-
}
810+
if(ax._hasDayOfWeekBreaks && ax.dtick < 7 * ONEDAY) ax.dtick = 7 * ONEDAY;
815811

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

Diff for: test/image/baselines/axes_breaks-round-weekdays.png

-2.76 KB
Loading
-1.63 KB
Loading

0 commit comments

Comments
 (0)