fix: round chart average label, update changelog

Fix formatAxisValue to show 1 decimal place for floats instead of raw
floating-point numbers. Update changelog with all UI improvements from
this session.
This commit is contained in:
Usman Baig
2026-03-07 00:26:36 +01:00
parent dee7089925
commit 77dc61e7d0
2 changed files with 9 additions and 3 deletions

View File

@@ -166,8 +166,9 @@ function ChartTooltip({
// * Compact Y-axis formatter: 1.5M, 12k, 99
function formatAxisValue(value: number): string {
if (value >= 1e6) return `${value / 1e6}M`
if (value >= 1000) return `${value / 1000}k`
if (value >= 1e6) return `${+(value / 1e6).toFixed(1)}M`
if (value >= 1000) return `${+(value / 1000).toFixed(1)}k`
if (!Number.isInteger(value)) return value.toFixed(1)
return String(value)
}