Fix scenario comparison chart showing zeros — use actualPeople for compare chart data

This commit is contained in:
Marty Bostick
2026-07-29 22:38:26 +00:00
parent 1f670b454e
commit b4cc75e8ac
+2 -2
View File
@@ -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}`];