Skip to content
Chat with your data · Explainer

Natural language to chart: how AI turns a question into a visual

What happens in the few seconds between typing a question and seeing a chart, step by step, and why each step matters for getting the right answer.

For the complete AI-readable content index, see /llms.txt.

By AnuragUpdated 5 min read
Share
On this page
  1. From question to chart in five steps
  2. Step 1: Understand the intent
  3. Step 2: Map words to columns
  4. Step 3: Write and run the query
  5. Step 4: Choose the chart
  6. Step 5: Explain what it shows
  7. How to steer each step
  8. When the chart looks wrong
  9. Check how a chart was calculated
  10. FAQ

Key takeaways

  • A question becomes a chart in five steps: intent, mapping, query, chart choice and explanation.
  • The AI does not draw the chart from imagination. It runs a real query and charts the result.
  • Chart type follows the shape of the result: a trend becomes a line, a ranking becomes bars.
  • You can steer every step by naming the metric, the breakdown, the window or the chart you want.

From question to chart in five steps

Type "Monthly revenue by region for the last 6 months" and a chart appears a few seconds later. Behind it, five things happen in order.

Step 1: Understand the intent

The question is broken into parts:

PartIn this question
Metricrevenue
Aggregationsum
Breakdownregion
Time grainmonth
Windowlast 6 months
Filtersnone

Most business questions fit this shape. When a part is missing, the tool fills it with a sensible default (for example, "all time" or the most recent complete period) or asks you. When a part is ambiguous, such as "revenue" when there are gross and net columns, a good tool asks rather than guesses.

Step 2: Map words to columns

Next, each part is matched to real columns. "Revenue" maps to order_value_usd, "region" to region, and "month" to the primary date column, order_date.

This step depends on the column profile created when the data was loaded. The profile records each column's type and role, so the AI knows that order_date is a date, order_value_usd is money to be summed and order_id is an identifier to be counted, never summed.

Poor column names are the most common reason this step goes wrong. val1 and dt2 give the AI nothing to work with, which is why clear names make such a difference.

Step 3: Write and run the query

With the parts mapped, the AI writes a query. For this question it is roughly:

SELECT date_trunc('month', order_date) AS month,
       region,
       SUM(order_value_usd) AS revenue
FROM orders
WHERE order_date >= date_trunc('month', current_date) - interval '6 months'
GROUP BY 1, 2
ORDER BY 1, 2;

The query runs against your data. In DashboardGPT, query execution is built on Apache Superset. This is the step that makes the numbers trustworthy: they are computed, not predicted by a language model.

Step 4: Choose the chart

The result has a time column, a category column and a measure. That shape calls for a line per region, or grouped bars if there are only a few months.

The general rules:

Result shapeChart
One numberMetric card
Measure over timeLine chart
Measure over time, split by a categoryMultiple lines, or stacked bars for parts of a total
Measure by categoryBar chart, sorted largest first
Parts of one whole, few categoriesShare chart
Two measures per itemScatter plot
Many columnsTable

The chart is chosen from the result, not from keywords in the question. Asking for "a trend" does not force a line if the result has no time column.

Step 5: Explain what it shows

Finally, a short written insight is generated from the result: which region is largest, which grew fastest, where the biggest change was. It cites the figures, so you can check them against the chart.

On the DashboardGPT canvas, the chart and its insight land together as one object. You can move it, group it with related answers or ask a follow-up about it.

How to steer each step

You control the result by what you put in the question:

  • Name the metric precisely: "net revenue after discounts" rather than "sales".
  • Name the breakdown: "by plan", "by channel", "by sales rep".
  • Name the window: "last 90 days", "Q3 2026", "since January".
  • Name the chart if you care: "as a bar chart, largest first".
  • Add filters in words: "only delivered orders", "excluding internal accounts".

And after the chart appears, you can adjust it with a follow-up: "Show this as a percentage of the total" or "Switch to weekly".

When the chart looks wrong

If a chart surprises you, check which step went wrong:

SymptomLikely stepWhat to do
Numbers far too bigMapping: an ID was summed, or a join doubled rowsOpen How it's calculated; name the right column
Wrong time rangeIntent: default window usedAdd the window to the question
Odd chart typeChart choice: result shape was unexpectedAsk for the chart type you want
Insight contradicts the chartExplanationTrust the chart's figures and report the mismatch

Check how a chart was calculated

You don't have to take a chart on trust. On the canvas, open a chart's menu and choose How it's calculated, or use the link at the top of the expanded view. Anyone who can see the canvas can open it, and it lists every step behind the numbers in order:

  • Reads: the data the chart uses and how many rows it holds.
  • Keeps rows where: the filters applied, or a note that every row is included.
  • Groups by: each breakdown, and the time period for dates, such as by month.
  • Calculates: each figure in plain words, such as "Total Revenue = Sum of Revenue".
  • Orders by and Shows: the sort order, such as highest first or oldest first, and how many rows the chart shows.

Every step names the column it uses, exactly as it appears in your data, and the kind of value it holds. Those are the two things most likely to go wrong with an ambiguous export: a similar-sounding column picked by mistake, or a column read as the wrong kind of value.

Some figures can't simply be added up, such as rates or unique users. When a chart asked for a total of one, the panel marks it Changed from sum and explains the average it uses instead, and a weighted average names the column it is weighted by. Figures the assistant created just for this chart are marked Chart only.

Spotted a problem? Choose Change visualisation, or ask again and name the column you meant. Checking before you export a canvas or publish it to Superset takes a few seconds and saves an awkward correction later.

DashboardGPT also checks for you. Before a canvas is saved or shared as a PDF, or published to Superset, it looks at every chart. If one has something its picture doesn't show, such as a total replaced by an average, a review lists it first with a link to How it's calculated, and you choose when to carry on. Review calculations in the Export menu opens the same list at any time.

Every PDF you save or share ends with chart details: the same steps, in the same words, for each chart on the canvas. Anyone reading it can see how the numbers were made without opening DashboardGPT.

Frequently asked questions

It identifies the metric, breakdown and time window in the question, maps them to real columns, writes and runs a query, picks a chart that fits the result and writes a short explanation.

No. The chart is drawn from the result of a real query against your data.

Yes. Add it to the question, or ask for a different chart after the first one appears.

The AI maps the words in your question to column names and profiles. Clear names such as `order_value_usd` make that mapping reliable.

A good tool asks you to clarify, for example whether you mean gross or net revenue, instead of guessing.

Yes. Choose How it's calculated from a chart's menu on the canvas. It shows the data the chart reads, its filters, how it groups the rows and how each figure is worked out, naming every column it uses. The same details appear at the end of every PDF you share.
Share this guide

More in Chat with your data

Keep reading

Pillar guide

Chat with your data: the complete guide to AI data analysis

How natural-language analytics works, where it beats pivot tables and SQL, and how to phrase questions so the answer is a chart you can trust.

Start here
How-to

From sign-up to your first dashboard in about three minutes

Sign up, add a file and get a canvas and your first answer in about three minutes.

How-to · 4 min read
How-to

How to chat with a CSV file and get charts, not paragraphs

Upload, ask, follow up: a walkthrough with a 40,000-row orders file.

How-to · 5 min read
How-to

How to chat with a Google Sheet and keep the answers up to date

Import a worksheet, ask it questions and keep the answers up to date.

How-to · 5 min read
How-to

How to ask questions of your Google Analytics and Search Console data

Ask your website traffic and search performance questions, and get charts back.

How-to · 6 min read
How-to

Ask about one dataset, starting from questions built for it

Start from questions built for each file, sheet or report, answered from that data.

How-to · 5 min read
How-to

Turn a spreadsheet into a canvas of charts in one step

Import a file or sheet and get a canvas of charts built for it in one step.

How-to · 5 min read
How-to

Send your dashboard by email on a schedule, with an AI summary

Email a canvas to your team on a schedule, with an AI summary and a PDF.

How-to · 5 min read
How-to

See your canvas as a dashboard, chat in full view and save it as a PDF

See any canvas as a tidy dashboard, chat in full view and save the whole thing as a PDF.

How-to · 5 min read
How-to

Update an uploaded file with new data, and keep every chart

Upload a newer file into a dataset you already use, and keep every chart built on it.

How-to · 5 min read
How-to

Get answers about DashboardGPT in seconds with the docs and Ask AI

Find answers in the docs, or ask the Ask AI box and get links to the guides behind each answer.

How-to · 4 min read
Explainer

AI answers that pick the right data and try again when they slip

How the assistant picks the right file, focuses on the right columns and tries again when it slips.

Explainer · 4 min read
How-to

Chat with your database: connect PostgreSQL, MySQL or MongoDB

Connect PostgreSQL, MySQL or MongoDB, choose what is shared and ask questions in plain English.

How-to · 5 min read
Test kit

How to test an AI data analyst: 50 questions and the ways answers go wrong

A 50-question test kit and the eight ways AI answers usually go wrong.

Test kit · 5 min read

Other topic hubs

Newsletter

New guides, in your inbox

A weekly digest of new guides and what shipped. No sales emails, and you can unsubscribe any time.

We only use your address for the newsletter. See our Privacy Policy.

Ask your data a question.

Open the playground and ask about revenue, churn or campaign spend. Charts, metrics and written insights appear on an infinite canvas.

  • No account, no install
  • Free plan with CSV and Excel uploads
  • Bring your own AI key