#Economy Performance by President: Testing Claude’s New Interactive Charts
Anthropic just launched a new beta feature in Claude — interactive charts and diagrams. Instead of static images or markdown tables, Claude can now generate fully functional, self-contained HTML dashboards with real interactivity. Tabs, tooltips, responsive layouts, dark mode — the works.
I figured the best way to test it was to throw a real question at it: how have the S&P 500, Dow Jones, and federal deficit changed across every U.S. presidency in my lifetime? One prompt. One self-contained HTML file. No frameworks to install, no build step — just Chart.js loaded from a CDN and clean vanilla JavaScript. The result speaks for itself:
Presidential economics dashboard
S&P 500, Dow Jones, and federal deficit changes across every U.S. presidency since 1981.
Click through the tabs — S&P 500 performance, Dow Jones performance, and federal deficit change. Each view updates the KPI cards and chart. Hover over bars for exact numbers. Resize your browser to see it adapt. Toggle dark mode on this site and watch the dashboard follow along.
#Impressions
A few things stood out:
- It just works. The output is a single HTML file. No dependencies beyond a CDN-loaded Chart.js. Drop it anywhere and it runs.
- Dark mode for free. It uses
prefers-color-schememedia queries, so it automatically matches whatever your OS or site is set to. - Responsive out of the box. The KPI cards reflow to a 2-column grid on mobile. The chart resizes with the container.
- Clean code. The generated JavaScript is readable and well-structured — not the spaghetti you might expect from AI-generated code.
This is a beta feature, but it already feels polished. For quick data visualizations, internal dashboards, or blog embeds like this one, it’s a massive time saver. No more wrestling with charting libraries or fighting CSS — just describe what you want and Claude builds it.
#Claude Visualized the Same Data for My Kids
My wife homeschools our kids, and if there’s one thing I’ve learned sitting in on lessons, it’s that raw economic data can put anyone to sleep — especially a kid. So I asked Claude to take the exact same presidential data and turn it into something a child would actually want to look at. Leaderboard-style rankings, emojis, fun facts, animated bars — the works. It nailed it.
Who was the best president for your money?
Pick a category below and see how each president scored — like a report card, but for the whole country!
#The prompt
I asked Claude to build me an interactive dashboard showing economic performance by president since Reagan. I wanted:
- S&P 500 and Dow Jones total returns per presidency
- Federal deficit changes — who grew it, who shrank it
- KPI cards highlighting the best and worst
- Tabs to switch between metrics
- Dark mode support and mobile responsiveness
Dashboards generated by Claude. Data sources: Yahoo Finance, Macrotrends, CBO, OMB.