It's trivial to add a default window in such cases, although the choice of sensible width is not obvious.
// (after line 220)
//
// If all the times are the same, force the timeline to cover
// 12 hours on either side.
//
if (beginning === ending) {
beginning -= (12 * 60 * 60 * 1000);
ending += (12 * 60 * 60 * 1000);
}
If it transpires that all of your data points are coincident then
beginning
will equalending
and https://github.com/jiahuang/d3-timeline/blob/master/src/d3-timeline.js#L223 will become undefined causing errors like:Error: <circle> attribute cx: Expected length, "NaN".
It's trivial to add a default window in such cases, although the choice of sensible width is not obvious.