Build a Likert-Scale Survey Results Infographic With Diverging Stacked Bars
A ready-to-paste prompt that builds a one-file survey infographic with diverging Likert bars centered on neutral, sample-size and margin-of-error callouts, net scores and key takeaways.
You getone complete HTML file in a single code block, then 3 short ideas to extend it.
The prompt
Act as a senior data-visualization designer who writes clean vanilla HTML, CSS and JavaScript. Build a survey results infographic titled Riverside Library Patron Survey 2025. It shows how 1,248 library users rated six statements on a 5-point Likert scale, from strongly disagree to strongly agree. Invent realistic percentages that total 100 for each statement, with one clear win, one weak spot and a few near-even splits. The core visual is a diverging stacked bar chart. Each bar is centered on the middle of its neutral segment, so disagreement extends left and agreement extends right of a shared vertical axis.
Rules:
1. Above the chart, show callout tiles for sample size, margin of error (±2.8 points at 95% confidence), fieldwork dates and number of statements.
2. Use a five-color diverging palette: warm reds for disagree, warm grey for neutral and blues for agree. Keep segment labels readable on every color.
3. Add a net score column (agree minus disagree). Flag any net within twice the margin of error as Too close.
4. Add sort buttons for survey order, most positive and most negative. Add a clickable legend that highlights one answer. Show tooltips with the percent and approximate headcount on hover, tap or keyboard focus.
5. End with three key takeaway cards and a short method note.
6. The layout must work from 360 to 1280px wide and use no external assets. Bars grow from the axis unless prefers-reduced-motion is set.
Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.Example output
Tips and common edits
Why this works
- Centering each bar on the midpoint of neutral is spelled out, so the model computes a shared axis instead of plain left-aligned stacks.
- Requiring a net score plus a Too close flag at twice the margin of error makes the statistical caveat visible, not buried.
- Fixed sample size, margin of error and theme mean the page works on first paste, with no follow-up questions.
Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as an .html file and open it in any browser, or view it in the chat's preview or canvas. To chart real results, swap in your own statements and percentages.
Common edits
- Replace the library statements and percentages with your own survey data. Keep each row summing to 100 and update n and the margin of error.
- Switch to a 7-point scale or a colorblind-safe purple and orange palette by editing the category list and color rule.
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
Keep exploring
More like this
Build a 100-Person Icon Array Demographic Infographic in One HTML File
You get a single HTML file that shows a fictional town as 100 SVG person icons, with tabs for commute, age and housing and an interactive legend that highlights each group.
Build a 12-Week Fitness Progress Tracker Infographic in a Single HTML File
Generates a one-page fitness report with bodyweight and lift line charts, personal-record badges, a streak calendar and an instant kg/lb toggle, all from built-in sample data.
Build a Budget Allocation Treemap Infographic in a Single HTML File
You get one HTML file that draws a squarified treemap of a city budget, hides labels on small blocks, and shows a details panel when you tap or click any block.
Build a Classroom Grade Distribution Infographic with Histogram and Quartiles
A single HTML file that turns an inline array of class scores into a histogram with mean and median markers, a box plot, stat cards and a plain-language summary.
Build a Creator Media Kit One-Pager With Audience Stats in HTML
A pitch-ready creator media kit page with animated follower counts, platform tabs, audience demographic bars, engagement benchmarks and a clickable package quote builder.
Build a Gantt-Style Project Timeline Infographic with Milestones in Pure SVG
A single HTML file that draws a project Gantt chart in pure SVG, with progress bars, dependency arrows, milestone diamonds, a Today marker and hover tooltips.