Skip to content

Commit 6cd55b5

Browse files
committed
drop extra function for hour rangebreaks
1 parent 0a782d8 commit 6cd55b5

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

src/plots/cartesian/axes.js

+1-23
Original file line numberDiff line numberDiff line change
@@ -739,25 +739,6 @@ function arrayTicks(ax) {
739739
return ticksOut;
740740
}
741741

742-
function roundBaseDay(dayHours) {
743-
switch(dayHours) {
744-
case 4: return [1, 2];
745-
case 6: return [1, 2, 3];
746-
case 8: return [1, 2, 4];
747-
case 9: return [1, 3];
748-
case 10: return [1, 2, 5];
749-
case 12: return [1, 2, 3, 4, 6];
750-
case 14: return [1, 2, 7];
751-
case 15: return [1, 3, 5];
752-
case 16: return [1, 2, 4, 8];
753-
case 18: return [1, 2, 3, 6, 9];
754-
case 20: return [1, 2, 4, 5, 10];
755-
case 21: return [1, 3, 7];
756-
case 22: return [1, 2, 11];
757-
}
758-
return [1];
759-
}
760-
761742
var roundBase10 = [2, 5, 10];
762743
var roundBase24 = [1, 2, 3, 6, 12];
763744
var roundBase60 = [1, 2, 5, 10, 15, 30];
@@ -827,10 +808,7 @@ axes.autoTicks = function(ax, roughDTick) {
827808
// 2 or 3 days... but that's a weird enough case that we'll ignore it.
828809
ax.tick0 = Lib.dateTick0(ax.calendar, true);
829810
} else if(roughX2 > ONEHOUR) {
830-
ax.dtick = roundDTick(roughDTick, ONEHOUR, ax._hasHourBreaks ?
831-
roundBaseDay(ax._dayHours) :
832-
roundBase24
833-
);
811+
ax.dtick = roundDTick(roughDTick, ONEHOUR, roundBase24);
834812
} else if(roughX2 > ONEMIN) {
835813
ax.dtick = roundDTick(roughDTick, ONEMIN, roundBase60);
836814
} else if(roughX2 > ONESEC) {

0 commit comments

Comments
 (0)