Skip to content

Commit 9e7b80e

Browse files
committed
drop extra logic for dayHours
1 parent 21f4284 commit 9e7b80e

File tree

1 file changed

+2
-16
lines changed

1 file changed

+2
-16
lines changed

src/plots/cartesian/axis_defaults.js

+2-16
Original file line numberDiff line numberDiff line change
@@ -136,24 +136,10 @@ module.exports = function handleAxisDefaults(containerIn, containerOut, coerce,
136136
delete containerOut.rangebreaks;
137137
} else {
138138
for(var k = 0; k < containerOut.rangebreaks.length; k++) {
139-
var brk = containerOut.rangebreaks[k];
140-
if(brk.pattern === DAY_OF_WEEK) {
139+
if(containerOut.rangebreaks[k].pattern === DAY_OF_WEEK) {
141140
containerOut._hasDayOfWeekBreaks = true;
141+
break;
142142
}
143-
144-
if(brk.pattern === HOUR) {
145-
containerOut._hasHourBreaks = true;
146-
147-
var dayHours = (brk.bounds[1] - brk.bounds[0] + 24) % 24;
148-
if(containerOut._dayHours === undefined) {
149-
containerOut._dayHours = dayHours;
150-
} else {
151-
containerOut._dayHours += dayHours;
152-
}
153-
}
154-
}
155-
if(containerOut._dayHours !== undefined) {
156-
containerOut._dayHours = Math.ceil(containerOut._dayHours);
157143
}
158144

159145
setConvert(containerOut, layoutOut);

0 commit comments

Comments
 (0)