From 8ab2b36034e6a3c54dc10a0ed584fff9a723d598 Mon Sep 17 00:00:00 2001 From: Henrik Giesel Date: Wed, 20 Jan 2021 22:07:02 +0100 Subject: [PATCH] Support languages with day labels larger than one character --- ts/graphs/calendar.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/graphs/calendar.ts b/ts/graphs/calendar.ts index 3afbc02f2..4c70ab012 100644 --- a/ts/graphs/calendar.ts +++ b/ts/graphs/calendar.ts @@ -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");