Back

Investment Growth Chart

$50,313
after 30 years at 8% annual return
20252054$0$10K$20K$30K$40K$50K$60K1Y30Y

Simulate one-time deposit

$5,000
2K3K4K5K6K7K8K

Component Code (Next.js)

https://github.com/anthropics/Proteus/blob/main/src/app/investmentgrowth/page.tsx

Claude / Codex Prompt

Build a compound investment growth chart in Next.js with SVG.

Requirements:
- Exponential bar chart showing compound growth over 30 years (8% annual return)
- Green glowing growth line overlaid on bars
- Interactive slider to adjust one-time deposit amount ($2K-$9K)
- Chart reacts in real-time as slider moves
- Final compound value displayed prominently
- Floating value bubble above slider thumb
- Ruler-style tick marks with labels below slider
- Horizontal gridlines with dollar amount labels
- Year range header and footer labels
- Light/dark theme support
- Card container with rounded corners and subtle border