From 12c1c87433e060930a447dcd6e5db3f61012b83f Mon Sep 17 00:00:00 2001 From: "Brennan Wilkes (Text Groove)" Date: Fri, 6 Feb 2026 13:09:32 -0800 Subject: [PATCH] UX Improvements --- viz/app/stats_page.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/viz/app/stats_page.js b/viz/app/stats_page.js index cea4a8b..0c0092f 100644 --- a/viz/app/stats_page.js +++ b/viz/app/stats_page.js @@ -452,6 +452,9 @@ function computeYBounds(seriesByStore, minSpan = 6, pad = 1) { if (mn === Infinity) return { min: -minSpan / 2, max: minSpan / 2 }; + mn = Math.min(mn, 0); + mx = Math.max(mx, 0); + // pad a bit so lines aren't glued to edges mn = Math.floor(mn - pad); mx = Math.ceil(mx + pad); @@ -785,17 +788,17 @@ export async function renderStats($app) { ticks: { stepSize: 1, + precision: 0, + autoSkip: false, // <- don't skip integer ticks callback: (v) => `${Number(v).toFixed(0)}%`, - maxTicksLimit: 12, }, grid: { drawBorder: false, - color: (ctx) => { - // Only draw for integer % values - if (!Number.isInteger(ctx.tick.value)) return "transparent"; - return ctx.tick.value === 0 ? "rgba(154,166,178,0.35)" : "rgba(154,166,178,0.18)"; - }, + color: (ctx) => + ctx.tick.value === 0 + ? "rgba(154,166,178,0.35)" + : "rgba(154,166,178,0.18)", lineWidth: 1, }, },