This is a bit of an open question rather than a specific issue, but, wouldn't it be useful to have a specific mode for dates?
Currently, to get meaningful bins of datetime data points, I believe one has to compute the thresholds outside, and do something like e.g.:
const ticks = d3.scaleTime().domain(d3.extent(data, d => d.date)).ticks(20);
bins = d3.bin().thresholds(ticks)(data)
and then, convert each bin’s x0 and x1 to Date objects.
See https://observablehq.com/d/8ab770342a94e839 for an example.
(maybe linked to #77)
This is a bit of an open question rather than a specific issue, but, wouldn't it be useful to have a specific mode for dates?
Currently, to get meaningful bins of datetime data points, I believe one has to compute the thresholds outside, and do something like e.g.:
and then, convert each bin’s x0 and x1 to Date objects.
See https://observablehq.com/d/8ab770342a94e839 for an example.
(maybe linked to #77)