Support languages with day labels larger than one character

This commit is contained in:
Henrik Giesel 2021-01-20 22:07:02 +01:00
parent 8e39ebb2f5
commit 8ab2b36034

View File

@ -179,9 +179,10 @@ export function renderCalendar(
.text((d) => d)
.attr("width", x(-1)! - 2)
.attr("height", height - 2)
.attr("x", x(0)!)
.attr("x", x(1)! - 3)
.attr("y", (_d, index) => bounds.marginTop + index * height)
.attr("dominant-baseline", "hanging")
.attr("text-anchor", "end")
.attr("font-size", "small")
.attr("font-family", "monospace")
.style("user-select", "none");