From be434d25e3e474ccd661d81e5f54a91dfba4712c Mon Sep 17 00:00:00 2001 From: Kelly Date: Tue, 9 Dec 2025 08:50:53 -0700 Subject: [PATCH] fix(backend): Round heatmap values to 2 decimal places MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevents long decimal numbers like 37.805740635007325 from displaying in the UI. Now shows clean values like 37.81. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- backend/src/multi-state/state-query-service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/src/multi-state/state-query-service.ts b/backend/src/multi-state/state-query-service.ts index 120cce6e..6d355535 100644 --- a/backend/src/multi-state/state-query-service.ts +++ b/backend/src/multi-state/state-query-service.ts @@ -824,10 +824,11 @@ export class StateQueryService { const result = await this.pool.query(query, params); // Parse numeric values from strings (PostgreSQL returns bigint as string) + // Round to 2 decimal places for display return result.rows.map((row: any) => ({ state: row.state, stateName: row.stateName, - value: row.value !== null ? parseFloat(row.value) : 0, + value: row.value !== null ? Math.round(parseFloat(row.value) * 100) / 100 : 0, label: row.label, })); }