diff --git a/index.html b/index.html index 43a179d..249255f 100644 --- a/index.html +++ b/index.html @@ -1787,6 +1787,16 @@ ${numPeople > 0 ? ` if (chart3) { chart3.destroy(); chart3 = null; } const datasets = [ + { + label: 'Their Profit', + data: chartValues, + borderColor: '#00d2ff', + backgroundColor: 'rgba(0,210,255,0.1)', + fill: true, + tension: 0.3, + pointRadius: 3, + pointHoverRadius: 5, + }, referralDataset, ].filter(Boolean); @@ -1815,12 +1825,13 @@ ${numPeople > 0 ? ` let tRows = ''; let runningCum = 0; for (const m of monthly) { - runningCum += m.comm * numPeople; + const actualPeople = Math.max(numPeople, 1); + runningCum += m.comm * actualPeople; tRows += ` Month ${m.m} ${m.phase} - $${(m.prof * numPeople).toLocaleString()} - $${(m.comm * numPeople).toLocaleString()} + $${m.prof.toLocaleString()} + $${(m.comm * actualPeople).toLocaleString()} $${runningCum.toLocaleString()} `; }