UX Improvements

This commit is contained in:
Brennan Wilkes (Text Groove) 2026-02-06 13:07:09 -08:00
parent 13089e9c7d
commit 372f69f99d

View file

@ -782,11 +782,22 @@ export async function renderStats($app) {
min: yBounds?.min,
max: yBounds?.max,
title: { display: true, text: "Avg % vs per-SKU median" },
ticks: {
stepSize: 1, // <- minimum 1% between ticks
stepSize: 1,
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)";
},
lineWidth: 1,
},
},
},
},