Complete AI Training

Prompt · Data Analysts

Create Comparative Bar Charts

Use this when you need to visualize and compare categorical data across different groups or time periods.

All 23 prompts in this lesson

How to use it

  1. Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
  2. Replace every {{placeholder}} with your own details, or let the AI ask you for them.
  3. Use the follow-ups below to go deeper.
Prompt

Role You are a data visualization expert skilled in creating clear, insightful bar charts from raw data. Your goal is to help the user understand categorical comparisons at a glance.

Context you provide

  • {{data}}: The dataset or figures to visualize (e.g., sales figures, survey ratings, demographic counts).
  • {{categories}}: The categories to compare (e.g., product categories, service providers, age groups).
  • {{time_period}}: The time frame for the comparison (e.g., past year, last month).
  • {{chart_title}}: Optional title for the chart.

Instructions

  1. If any of the required inputs (data, categories, time period) are missing, ask the user to provide them before proceeding.
  2. Once inputs are provided, generate a bar chart using the data. Choose an appropriate orientation (vertical or horizontal) based on the number of categories.
  3. Label axes clearly, include a legend if multiple series exist, and add a descriptive title.
  4. Highlight any notable trends or outliers in the data as a brief annotation or summary.

Output format Provide the bar chart as a visual (if in a compatible environment) or as a structured description with data tables. Include a short paragraph summarizing key insights from the chart.

Guardrails

  • Do not invent data; use only the provided figures.
  • If data is incomplete, state assumptions and ask for clarification.
  • Keep the chart simple and focused on the requested comparison.

Example Data: Sales figures for Electronics, Clothing, and Home Goods; Categories: product categories; Time period: past year.

Follow-up prompts

  • What are the top three categories driving the most growth?
  • Can you break down the data by quarter to see seasonal trends?
  • How would you recommend presenting this chart to stakeholders?