Skip to content

Commit 8c8c928

Browse files
committed
drop extra logic for dynamic oneDay
1 parent db7d47d commit 8c8c928

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

src/plots/cartesian/axes.js

+2-10
Original file line numberDiff line numberDiff line change
@@ -784,23 +784,15 @@ axes.autoTicks = function(ax, roughDTick) {
784784
// being > half of the final unit - so precalculate twice the rough val
785785
var roughX2 = 2 * roughDTick;
786786

787-
var oneDay = ONEDAY;
788-
if(ax._hasHourBreaks) {
789-
oneDay = ax._dayHours * ONEHOUR;
790-
}
791-
792787
if(roughX2 > ONEAVGYEAR) {
793788
roughDTick /= ONEAVGYEAR;
794789
base = getBase(10);
795790
ax.dtick = 'M' + (12 * roundDTick(roughDTick, base, roundBase10));
796791
} else if(roughX2 > ONEAVGMONTH) {
797792
roughDTick /= ONEAVGMONTH;
798793
ax.dtick = 'M' + roundDTick(roughDTick, 1, roundBase24);
799-
} else if(roughX2 > oneDay) {
800-
ax.dtick = roundDTick(roughDTick, oneDay, ax._hasDayOfWeekBreaks ?
801-
[1, 2, 7, 14] :
802-
roundDays
803-
);
794+
} else if(roughX2 > ONEDAY) {
795+
ax.dtick = roundDTick(roughDTick, ONEDAY, ax._hasDayOfWeekBreaks ? [1, 2, 7, 14] : roundDays);
804796
// get week ticks on sunday
805797
// this will also move the base tick off 2000-01-01 if dtick is
806798
// 2 or 3 days... but that's a weird enough case that we'll ignore it.
-1.87 KB
Loading
-80 Bytes
Loading

0 commit comments

Comments
 (0)