Skip to content

Commit 35b7954

Browse files
committed
ensure positive ms periods
1 parent 6321beb commit 35b7954

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/plots/cartesian/align_period.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ module.exports = function alignPeriod(trace, ax, axLetter, vals) {
2020
var period = trace[axLetter + 'period'];
2121
if(isNumeric(period)) {
2222
period = +period; // milliseconds
23+
if(period <= 0) return vals;
2324
} else if(typeof period === 'string' && period.charAt(0) === 'M') {
2425
var v = +(period.substring(1));
2526
if(v > 0 && Math.round(v) === v) period = v; // positive integer months

0 commit comments

Comments
 (0)