From b65229dc80f1928faa7050c1f218f61dd43ddd59 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Sun, 1 Nov 2026 13:03:37 -0600 Subject: [PATCH] remove granuality --- .../components/Characteristics/components/StatScale.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/StatScale.tsx b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/StatScale.tsx index 32f867b01..d124a2c81 100644 --- a/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/StatScale.tsx +++ b/packages/website/src/components/Tankopedia/CharacteristicsSection/components/Characteristics/components/StatScale.tsx @@ -1,6 +1,5 @@ import { memo, useMemo } from "react"; -const RESOLUTION = 1000; const HEIGHT = 9; const DENSE_TICKS = 100; @@ -20,9 +19,9 @@ export const StatScale = memo( for (const other of values) { const raw = range === 0 ? 0.5 : (other - min) / range; - const x = Math.round((lowerIsBetter ? 1 - raw : raw) * RESOLUTION); + const x = lowerIsBetter ? 1 - raw : raw; - if (x === 0 || x === RESOLUTION) continue; + if (x === 0 || x === 1) continue; counts.set(x, (counts.get(x) ?? 0) + 1); } @@ -58,7 +57,7 @@ export const StatScale = memo( style={{ position: "absolute", top: 0, - left: `${(x / RESOLUTION) * 100}%`, + left: `${x * 100}%`, width: 1, height: "100%", backgroundColor: color,