How to Make a Double Bar Graph with ChatGPT

Cody Schneider8 min read

Creating a dual bar graph doesn't have to mean wrestling with clunky spreadsheet software or needing a data science degree. With the right prompt, you can use a powerful tool like ChatGPT to generate a clear, professional-looking chart in just a few seconds. This article will walk you through preparing your data, writing effective prompts, and customizing your graph, all by having a simple conversation with an AI.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

What Exactly Is a Double Bar Graph? (And When to Use One)

Before jumping in, let's quickly cover what a double bar graph is for. Think of it as a tool for comparison. It uses two sets of bars side-by-side for each category on a single chart, making it incredibly easy to see the relationship between two different groups of data.

It’s the perfect choice when you want to compare:

  • Two different time periods (e.g., Sales this year vs. Last year per quarter).
  • Two separate marketing channels (e.g., Traffic from Google vs. Traffic from Facebook by month).
  • Performance of two given metrics (e.g., Revenue from Product A vs. Revenue from Product B by store location).
  • Two demographic segments (e.g., Survey responses from Men vs. Women for a series of questions).

The shared axis (usually the horizontal or x-axis) represents the categories you are comparing - like months, products, or regions - while the length of the bars represents the value, such as revenue, sessions, or user count.

Step 1: Get Your Data Ready for ChatGPT

The single most important step in this process happens before you even open ChatGPT. The quality of the chart you get out is directly dependent on the clarity of the 'AI-friendly' data you put in. AI models work best with simple, clean, and well-structured information. Confusing layouts, merged cells, and unnecessary notes will only lead to errors or nonsensical charts.

Here’s how to format your data for the best results: create a clear, tabular format that you can copy and paste directly into the chat.

Imagine we're a marketing team trying to compare website traffic from two key channels over the last quarter. Your data should look something like this:

Good Data Example:

Notice a few key details:

  • Clear Headers: Each column has a straightforward title (Month, Social Media Traffic, Organic Search Traffic). ChatGPT will use these to understand what it's looking at and often use them as default labels.
  • Simple Structure: It’s a basic comma-separated or table-like format. There’s no fancy formatting, no merged cells, and no extra comment threads trying to add extra color or context about some data points. It is simply the data.
  • No Gaps: Every row and column is filled in.

Poorly Formatted Data Example (What to Avoid):

Traffic Source Report for Q1
-- We saw a nice uptick in March from our special SEO campaign --
Jan/Feb/Mar
Social, 1500, 1800, SEO, 2200, 2500
For March, social got 2100 users while our SEO campaign led to 2900! Great job team!

This messy format forces the AI to guess what things mean, which is where mistakes happen. Stick to the simple, clean table format for a predictable and accurate result.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Step 2: Write Your First Prompt

Now that your data is ready, it's time to ask ChatGPT to create the graph. Simplicity wins the day here. For your initial prompt, you don’t need to be overly descriptive or polite. You just need to provide your data and a clear instruction. The most reliable approach is one that separates context from instructions in your prompts.

In a new chat, paste your clearly formatted data and follow it with a direct command like:

Here is some data:
Month, Social Media Traffic, Organic Search Traffic January, 1500, 2200 February, 1800, 2500 March, 2100, 2900
Based on the data above, please create a double bar graph comparing Social Media Traffic and Organic Search Traffic for each month.

When you enter this prompt, ChatGPT (specifically models like a paid version of ChatGPT, the free version isn't capable of performing a task like this as we wrote this article) will recognize the tabular data and then write and execute Python code in the background using libraries like Matplotlib or Seaborn. You will get a chart returned in image format in the chat window, ready to be reviewed by you.

Step 3: Refine AI-generated Chart with Follow-Up Prompts

The first chart you get may not be perfect, and this is where the conversation format shines. Instead of navigating menus or learning different functionalities to adjust the labels and titles of the legend, you can use follow-up requests to tweak or refine every element of your chart. This allows you to create a visual that is ready for reporting or presentations.

You can iteratively test or ask for variations like the following, which you can easily switch between, ultimately saving and then sending.

Improving Titles and Labels

Generic titles are common. Let’s make ours more descriptive and professional.

Follow-Up Prompt: "Change the chart title to 'Q1 Website Traffic Performance: Social vs. Organic'. Please also label the Y-axis as 'Total Sessions'."

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Adjusting Colors and Styles

You might need to match company branding or simply prefer a different color palette. You can change a color for your series by using a simple prompt. You don't have to ask or provide the AI extra information about the work you've already done because it will know that conversation has taken place previously.

Follow-Up Prompt: "This is great, but let's change the bar colors a bit. Can you make our bars representing social media traffic bright blue and those representing organic traffic green?"

Switching Graph Orientation

Sometimes your chart might just "look better" if presented horizontally. This is easy with LLMs as your data viz engine.

Follow-Up Prompt: "Can you change this from a vertical bar graph to a horizontal one?"

By treating it as a dialogue, you maintain your context throughout the process, guiding the model towards creating a set that works perfectly. Experiment with your new prompts as you see fit.

Beyond the Basics: Important Chatbot Caveats of ChatGPT

While generating a chart with ChatGPT is fast and convenient, as demonstrated, it is an impressive role AI currently performs. However, this process won't always be as seamless based on your category of data. Chat-based charting software on an external LLM will have limitations based on its current environment - and some factors are important to know for those looking for data-driven work on a regular basis that could create a bottleneck in the long run.

Limitation #1: Charts Are Not Interactive or 'Live' from Your Data Source

One main point to keep in mind is that every time you create a chart or graph with ChatGPT, your file is returned as a static format. This is great for sharing, but if you need more data points or want to filter the data on your chart differently, you need to go outside your chatbot environment to a tool like Excel to obtain more answers. This process is reasonable and can be very effective for project-based work. However, if you and your employees need the information daily to act based on those numbers, going back and forth may become time-consuming.

Limitation #2: Be Cautious of Data Privacy Concerns

I suggest avoiding uploading any financial or customer information within a Chatbot. Because LLMs are built for all, your inputs (prompts, and CSVs or text documents you upload) could potentially be used in future training sets for anyone who works with the tool next. To protect yourselves and the privacy of others in your organization, avoid using these platforms for sensitive data for analysis and visualization.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Limitation #3: You Have No Data Control via an API

In addition to the first two caveats to watch out for, the lack of automated setup with ChatGPT means everything from data collection to application will require manual input every step of the way. Until you have API integrations with large BI or analytical reporting platforms, all processes will be manual. This is really common for many LLMs. While a reporting team might be working on CSV files from different marketing platforms and then combining those spreadsheets inside Excel for analyzing data, they can move on to creating visuals and key takeaways from those insights found in the chart to present with their team in a scheduled meeting.

Multiple follow-up questions for ad-hoc queries mean your data exploration process through analysis might be taking almost half your work week. It can work great for teams needing information for reporting once a week, but most want to see up-to-date charts regularly.

Final Thoughts

While ChatGPT offers a surprisingly powerful and intuitive avenue for spinning up quick charts with zero coding, its strengths truly lie in generating on-the-fly visuals from clean, shareable data. It breaks down technical barriers, but it’s still a manual process that relies on you to gather, clean, and input data.

If the "copy-paste routine" sounds exhausting and you often find your team needing deeper analytics and reporting for any campaign data sources regularly, I suggest looking for an analytics tool that keeps your data up-to-the-minute. We built one from scratch here called Graphed because we wanted to help business owners move away from static-data reporting. We wanted to give marketers an option in software, where we connect our sources for you instantly, so your entire team has real-time dashboards and reporting available on any device. Since we built it based on LLMs themselves, our whole product uses natural language to answer questions in seconds instead of hours without having to rely on admin for data and analytics again.

Related Articles