chore: aggregate chart label changes

This commit is contained in:
Arjun Choudhary 2022-11-25 11:19:51 +05:30
parent e3710f0e16
commit 1ab2ca2bd4

View File

@ -307,7 +307,7 @@ export function heatSquare(
return createSVG("rect", args); return createSVG("rect", args);
} }
export function legendBar(x, y, size, fill = "none", label, truncate = false) { export function legendBar(x, y, size, fill = "none", label, truncate = true) {
label = truncate ? truncateString(label, LABEL_MAX_CHARS) : label; label = truncate ? truncateString(label, LABEL_MAX_CHARS) : label;
let args = { let args = {
@ -366,7 +366,7 @@ export function legendDot(
y: 0, y: 0,
dx: FONT_SIZE + "px", dx: FONT_SIZE + "px",
dy: FONT_SIZE / 3 + "px", dy: FONT_SIZE / 3 + "px",
"font-size": FONT_SIZE * 1.6 + "px", "font-size": FONT_SIZE * 1.2 + "px",
"text-anchor": "start", "text-anchor": "start",
fill: FONT_FILL, fill: FONT_FILL,
innerHTML: label, innerHTML: label,