d3-time icon indicating copy to clipboard operation
d3-time copied to clipboard

Half years for time axis

Open ygoe opened this issue 5 years ago • 2 comments

The time axis seems to consider 3 months or 12 months when it should decide how many ticks to generate. That's a big jump and often leaves the axis with a single tick at the beginning of a year. Axes with a single label are always very hard to read, so a second label at the middle of the year would be necessary. And when jumping from 3 to 12 months interval, there's still plenty of space for selecting 6 months until the time span gets so long that two beginnings of a year appear.

I can halfway work around that by generating ticks and counting them. If the result is 1, I need to suggest more ticks, no matter the available space. But it still has the problem that an axis with ticks at January and July is never displayed and so month names overlap quite a bit before only years are generated. A single tick doesn't tell the user anything. Overlapping labels at least tell the user to assign more space.

ygoe avatar Nov 27 '20 18:11 ygoe

Agree. We should add a 6-month interval to ticks generation.

mbostock avatar Jun 27 '23 16:06 mbostock

We should also add a 2-week interval between 1 week and 1 month.

mbostock avatar Aug 18 '23 17:08 mbostock