Closed
Description
If the interval option is used in conjunction with an ordinal scale, we should be able to use the nice multi-line time axis to choose appropriate ticks and tick format automatically. For example, I should be able to drop the ticks and tickFormat option here and get the same result:
Plot.barY(
aapl,
Plot.groupX(
{ y: "median", title: "min" },
{ title: "Date", x: "Date", y: "Close" }
)
).plot({
x: {
interval: "month",
tickFormat: "%Y",
ticks: d3.utcYears(...d3.extent(aapl, (d) => d.Date))
}
})
Related #932.