Data Visualization in the Age of AI: When Anyone Can Make a Chart, Trust Is the Hard Part
DEV Community

Data Visualization in the Age of AI: When Anyone Can Make a Chart, Trust Is the Hard Part

A chart used to take effort. Someone had to pull the data, pick a chart type, fight a library and tweak the axis until it looked right.

That effort was slow, but it also meant a person had thought about every chart before anyone saw it. That's no longer true. Ask Claude, ChatGPT or Cursor for "a dashboard of revenue by region" and you get one in under a minute: data, layout, colors and all.

Making a chart now costs almost nothing. When making something gets cheap, the hard part moves somewhere else. For charts, it moves to trust. Is the chart right? Does it show what the data actually says? Would the person reading it make the same decision if they saw the raw numbers?

This guide is about that shift: what changes when AI builds most charts, what goes wrong, and how to design charts and chart tools so that fast doesn't mean misleading.

What actually changed

Three things are different from five years ago.

  1. The author is often not the reader. A developer asks an agent for a chart, glances at it and ships it. The finance lead who reads it next week never saw the prompt, the data or the choices. Before, someone had to make those choices on purpose. Now the defaults make them.
  2. Defaults decide more than ever. An AI doesn't have opinions about axis baselines or missing months. It uses whatever the library does by default, plus what it has seen most often in public code. If the default starts the y-axis at the lowest value, most generated charts will exaggerate small changes. If the default draws a line straight across a missing month, most generated charts will hide the gap.
  3. Charts are read by machines too. AI assistants now summarise dashboards, answer questions about them and turn them into reports. A chart that is only pixels on a canvas is invisible to them. A chart that has a text summary and a data table behind it can be read by a screen reader, a search engine and an AI assistant alike.

The new failure modes

Classic chart mistakes haven't gone away. AI just makes them faster and more common, and adds a few of its own.

Plausible but wrong data

The most dangerous AI chart is the one with invented numbers. When an agent can't find the real data, it often fills in realistic-looking sample values so the chart "works". The chart looks finished, so nobody checks.

Always ask: where did these numbers come from? If the answer isn't a query, a file or an API you can point to, the chart is a mockup, not a report.

The truncated axis by default

A bar chart whose axis starts at 95 instead of 0 turns a 2% difference into a bar that looks twice as tall. Bar length only means something when it starts at zero. Many libraries pick the axis range from the data by default, and an agent rarely overrides it.

Smoothed-over gaps

A month with no data is information. Maybe the pipeline broke, maybe the store was closed. A line drawn straight through it tells the reader that month happened and was average. Missing values should look missing: a break in the line, an empty slot, a note.

The half-finished period

Charts made mid-month show the current month as a sharp drop, because it only has half the data. Readers see a crash that isn't real. A good chart marks the partial period clearly or leaves it out.

Forecasts that look like actuals

Ask an AI to "add a projection" and you'll often get a line that continues in the same color and style as the real data. The reader can't tell where facts end and guesses begin. Forecasts need a visible difference, such as a dashed line, a lighter color or a shaded range, and a label.

Two y-axes

Putting two measures with different scales on one chart, one on the left axis and one on the right, lets you make any two lines look related, just by choosing the scales. It's one of the most common chart requests and one of the most misleading results. Two measures usually need two charts, or one indexed chart where both start at 100.

The wrong chart for the question

Pie charts with twelve slices, lines connecting categories that have no order, stacked bars where only the bottom segment can be compared. AI picks chart types from patterns, not from the question being asked.

"What changed between Q1 and Q2?" is a slope or dumbbell chart question. "How did we get from budget to actual?" is a waterfall question. The type is part of the answer.

Reviewing is the new skill

If AI does the building, the human job is reviewing. A chart review takes two minutes if you know what to look for. Here's a checklist that works for any chart, whoever made it:

  • Source. Can you name where the data came from? Open the table view or export it and spot-check two numbers.
  • Baseline. Do bars start at zero? If an axis doesn't start at zero, is there a clear reason?
  • Gaps. Are missing values visible, or has something been filled in?
  • Partial periods. Is the latest period complete? If not, is it marked?
  • Forecasts. Can you tell actuals from projections at a glance?
  • One scale. Is there exactly one y-axis?
  • Type. Does the chart type match the question in the title?
  • Title. Does the title state the takeaway ("Cloud costs are 8% over budget") rather than just the topic ("Cloud costs")? And does the data support that takeaway?
  • Color. Do colors mean something consistent, and can someone with color-vision deficiency still tell the series apart?
  • Access. Can someone read it without a mouse or without seeing it: keyboard, screen reader, table view?

None of this needs data-science training. It needs the habit of checking.

Design charts that are safe to generate

The better fix is upstream: make the defaults safe, so that the chart an AI produces without special instructions is already honest. If you build chart components, a design system or internal dashboard tools, this is where you have the most leverage.

Make the honest choice the default. Bars from zero. Gaps for null values. Partial periods flagged. Forecasts styled differently from actuals. One y-axis, with no option for a second one. An agent will use whatever is easiest, so make the easiest thing the right thing.

Fail loudly, not silently. If the data has the wrong shape, render a clear message such as "No data" or "Field revenue not found" instead of an empty box. Agents can fix errors they can see. Blank charts get shipped.

Keep the data inspectable. Every chart should be one click away from its numbers: a table view, a CSV export. That's what makes the review checklist above possible, and it helps readers trust the chart.

Write down when to use each chart. "Use a waterfall to explain how a starting value became an ending value. Don't use it for unrelated categories." Short, explicit guidance like this helps people and AI pick the right chart. Put it where agents can read it: in the docs, in type comments, in an llms.txt file.

Make charts readable by machines. A short text summary, proper labels and a real data table make the chart accessible to screen readers. They also make it understandable to search engines and AI assistants. Accessibility and AI-readiness turn out to be the same work.

What stays human

AI is very good at the mechanical parts of a chart: wiring data, laying out axes, matching a design system. It's improving at picking chart types. But some decisions stay human, because they depend on context the AI doesn't have:

What question matters. The same data can answer ten questions. Choosing the one your team needs answered is judgment, not code.

What counts as good. A 3% churn rate is a crisis for one company and a record for another. Targets, ranges and thresholds come from the business.

What to leave out. Removing a series, a metric or a whole chart is often the most useful edit. AI tends to add, not subtract.

Whether the story is true. A clean chart can still support a wrong conclusion. Someone who knows the business has to ask "does this match what we know?"

Where this is heading

Charts aren't going away. If anything, there will be many more of them, because they're now almost free to make. That raises the value of the things that don't come free: correct data, honest defaults, clear choices and a quick review by someone who understands the question.

The teams that do well won't be the ones that make the most charts. They'll be the ones whose charts people can trust without re-checking the numbers in a spreadsheet.

How we approach it

Disclosure: I build ChartslibraryUI. We build ChartslibraryUI, React chart components that try to follow this guide by default. Bars start at zero, missing values show as gaps, partial periods and forecasts are marked, and there's no dual axis. Every chart has a table view and CSV export, keyboard navigation and a text summary. Each chart's docs say when to use it and when not to, and the whole catalog is available to coding agents through llms.txt and the shadcn registry.

If you're choosing a library for agent-written code specifically, see the best chart library for AI coding agents. For specific chart types, the guides on variance charts, budget vs actual and small multiples go deeper.

Originally published on chartslibraryui.com.

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.