From b4cc75e8ac298fd76670c74b589cd0b3087646f3 Mon Sep 17 00:00:00 2001 From: Marty Bostick Date: Wed, 29 Jul 2026 22:38:26 +0000 Subject: [PATCH] =?UTF-8?q?Fix=20scenario=20comparison=20chart=20showing?= =?UTF-8?q?=20zeros=20=E2=80=94=20use=20actualPeople=20for=20compare=20cha?= =?UTF-8?q?rt=20data?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c2e12ae..9225393 100644 --- a/index.html +++ b/index.html @@ -1931,13 +1931,13 @@ ${numPeople > 0 ? ` const ctx3 = document.getElementById('compareChart').getContext('2d'); const compareLabels = SCENARIOS.map(s => s.label.replace('$', '').replace('(', '').replace(')', '')); - const compareData = SCENARIOS.map(s => Math.round(s.yr1 * mult * numPeople)); + const compareData = SCENARIOS.map(s => Math.round(s.yr1 * mult * actualPeople)); chart3 = new Chart(ctx3, { type: 'bar', data: { labels: compareLabels, datasets: [{ - label: `Year 1 Earnings (${numPeople} people)`, + label: `Year 1 Earnings (${actualPeople} person${actualPeople > 1 ? 's' : ''})`, data: compareData, backgroundColor: compareData.map((v, i) => { const ids = [`gift${giftLevel}`, `self${selfLevel}`];