From 2af2412e288cc9fb0759d4502036acd961626713 Mon Sep 17 00:00:00 2001 From: GithubAnon0000 <160563432+GithubAnon0000@users.noreply.github.com> Date: Sat, 26 Apr 2025 15:36:07 +0200 Subject: [PATCH] FIX: percentage is not below kind --- ts/routes/graphs/buttons.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/routes/graphs/buttons.ts b/ts/routes/graphs/buttons.ts index cf8e57dd6..98b80e4ce 100644 --- a/ts/routes/graphs/buttons.ts +++ b/ts/routes/graphs/buttons.ts @@ -170,12 +170,13 @@ export function renderButtons( // Create a tspan for the text content (the "kind" part) const tspan = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); tspan.textContent = current_text_element_content; - tspan.setAttribute("dy", "0"); + tspan.setAttribute("dy", "0.5em"); // Create a tspan for the percentage const tspan2 = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); tspan2.textContent = `\u200e(${totalCorrect(d).percent}%)`; tspan2.setAttribute("dy", "1em"); + tspan2.setAttribute("dx", "-4em"); // i realized it works. It's probably a coincidence and a hack current_text_element.appendChild(tspan); current_text_element.appendChild(tspan2);