diff --git a/src/d3-timeline.js b/src/d3-timeline.js index 5671d0a..3b4fc21 100644 --- a/src/d3-timeline.js +++ b/src/d3-timeline.js @@ -220,7 +220,11 @@ } } - var scaleFactor = (1/(ending - beginning)) * (width - margin.left - margin.right); + var scaleFactor = 0; + if (ending !== beginning) { + scaleFactor = (1/(ending - beginning)) * (width - margin.left - margin.right); + } + // draw the axis var xScale = d3.time.scale()