novus/nvd3 — pull request #509 by NerdGGuy (2014-04-23 13:58:10+00:00)
Title: TimeLineWithFocusChart with dynamic axis

Compare with lineWithFocusChart. Allows for adjustable tickFormat for specific focuses.
chart.xTickFormat.re(function (data) {
range = d3.extent(d3.merge(data.map(function(d) { return d.values })).map(function(d) { return d.x }).concat([]));
return function (d) {
if((range[1] - range[0]) > day)
return dateFormat(new Date(d));
else
return timeFormat(new Date(d));
}
});