--
You received this message because you are subscribed to the Google Groups "dc-js user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dc-js-user-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dc-js-user-group/92b2e5a3-c56c-4cb5-954b-de0163971dca%40googlegroups.com.
Okay, that wasn't quite enough. Even with rounding, this would only group by 15-minute intervals but discard the rest of the date (putting all hours in the same bucket.
The right way to do this is to use d3.time.interval, but it's not exposed:
Still, until that gets resolved, we can copy that code and use it. Here is a generalization of d3.time.minute for multi-minute intervals, using d3_time_interval:
function n_minutes_interval(nmins) {var denom = 6e4*nmins;return d3_time_interval(function(date) {return new d3_date(Math.floor(date / denom) * denom);}, function(date, offset) {date.setTime(date.getTime() + Math.floor(offset) * denom); // DST breaks setMinutes}, function(date) {return date.getMinutes();});}
To view this discussion on the web visit https://groups.google.com/d/msgid/dc-js-user-group/3BB4787B-2B4A-489A-9178-E5838204E286%40woodhull.com.
--
You received this message because you are subscribed to the Google Groups "dc-js user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dc-js-user-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dc-js-user-group/6C651128-64E3-49D8-AEEB-04789D35523E%40woodhull.com.