Skip to content

Commit db7d47d

Browse files
committed
drop extra logic for dayRatio
1 parent 6cd55b5 commit db7d47d

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

src/plots/cartesian/axes.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -785,10 +785,8 @@ axes.autoTicks = function(ax, roughDTick) {
785785
var roughX2 = 2 * roughDTick;
786786

787787
var oneDay = ONEDAY;
788-
var dayRatio = 1;
789788
if(ax._hasHourBreaks) {
790789
oneDay = ax._dayHours * ONEHOUR;
791-
dayRatio = Math.round(ax._dayHours / 24 * 7) / 7; // we use this in week context
792790
}
793791

794792
if(roughX2 > ONEAVGYEAR) {
@@ -800,7 +798,7 @@ axes.autoTicks = function(ax, roughDTick) {
800798
ax.dtick = 'M' + roundDTick(roughDTick, 1, roundBase24);
801799
} else if(roughX2 > oneDay) {
802800
ax.dtick = roundDTick(roughDTick, oneDay, ax._hasDayOfWeekBreaks ?
803-
[1, 2 * dayRatio, 7 * dayRatio, 14 * dayRatio] :
801+
[1, 2, 7, 14] :
804802
roundDays
805803
);
806804
// get week ticks on sunday
-463 Bytes
Loading
Loading

0 commit comments

Comments
 (0)