Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Public data

Default charts on real tables: what breaks, and what a vision model catches

434 of 600 default charts of real tables had broken text; told what to look for, two vision models flagged 96% and 99% of them, and 6% and 8% of the clean ones

A data team's dashboards, scheduled reports and alert emails are drawn by code from tables nobody looked at first, and teams now consider a vision model as the reviewer. This is what that reviewer catches, measured against the renderer's own record of where every piece of text sits. The prediction made before any chart was drawn was that such a reviewer would miss a large share; the opposite happened. In a split read after the results, GPT-6.1 Sol caught all 34 subtle overlaps and Claude Sonnet 5.5 caught 6 of them.

Main limitation: Most defects were glaring (216 of 250 overlaps clear), the prompt named both defects, and each chart was asked once. The subtle-overlap split was chosen after the results and rests on 34 charts from 18 tables.

What to do: Measure text boxes in the code that draws the chart and block on them: exact for the definition it checks, and free. Use a vision model only where the boxes cannot be read (screenshots, PDFs, slides), and measure it on your own charts first: on charts like these it flagged about one clean chart in 13 to 17.

Both models flagged nearly every chart with broken text and few clean ones; on the subtle overlaps Claude Sonnet 5.5 caught 6 of 34 and GPT-6.1 Sol all 34.

Share of the 434 charts with a measured defect that the model flagged (all), of the 34 with only subtle overlaps, under 20% of a label (subtle; this split was read after the results), and of the 166 clean charts (false alarms). The highlighted bar is where the models part.

Defective charts flagged, subtle overlaps flagged, and clean charts flagged, per model0%50%100%GPT-6.1 SolGPT-6.1 Sol: flagged 430 of 434 charts with overlapping or clipped text (99%).99% allGPT-6.1 Sol: flagged 34 of 34 charts whose only overlaps are subtle (under 20% of a label; a split read after the results) (100%).100% subtleGPT-6.1 Sol: flagged 13 of 166 clean charts (8%).8% false alarmsClaude Sonnet 5.5Claude Sonnet 5.5: flagged 418 of 434 charts with overlapping or clipped text (96%).96% allClaude Sonnet 5.5: flagged 6 of 34 charts whose only overlaps are subtle (under 20% of a label; a split read after the results) (18%).18% subtleClaude Sonnet 5.5: flagged 10 of 166 clean charts (6%).6% false alarms

Both rates for both defect types are in the rates chart, with their table.

Long category names and big numbers in real data are what break a default layout. Here the ruler is the renderer itself: it reports the box of every piece of text it draws, so overlap and clipping are measured exactly, not judged, and each model is scored against that measurement.

Default charts with a defect72%434 of 600 charts of 200 Statistics Canada tables: 99.5% of bar charts, 58% and 60% of the two line chartsClaude Sonnet 5.596%of defective charts flagged, both defect types (418 of 434); 6% of clean charts flagged (10 of 166)GPT-6.1 Sol99%of defective charts flagged, both defect types (430 of 434); 8% of clean charts flagged (13 of 166)Where they differ6 of 34subtle overlaps (under 20% of the label) flagged by Claude Sonnet 5.5; GPT-6.1 Sol flagged 34 of 34

In plain words

A chart that a program draws without anyone looking can come out broken: x labels printed on top of each other, or a long title running off the edge of the image. This study asks how often that happens with a charting library's default settings on real tables, and whether a vision model, shown the image and asked to check it, notices.

The tables are 200 official tables from Statistics Canada: the 5045 current tables its data service lists were put in a random order with a fixed seed, and the first 200 that could give all three charts were kept (515 tried). The findings describe tables like those. Each was drawn three ways with matplotlib's defaults, as a first draft would be: a bar chart of the latest period, a line chart of one series, and a line chart of up to five series with a legend. That gives 600 charts. The rate of broken charts describes these three plain specifications on these tables. It is not a fact about the library: rotate the labels or turn the bars sideways and the rate changes.

Both models saw the same image and the same short prompt, which named the two problems and asked for a yes or no on each. Each model gets two numbers, always side by side: the share of broken charts it flagged, and the share of clean charts it flagged anyway. A model that flags everything catches every defect, and a model that flags nothing never raises a false alarm, so either number alone says little.

Overlap
Two pieces of text whose boxes cross by at least 2 pixels both ways on a 640 by 480 image.
Clipped
Text whose box runs at least 2 pixels past the image edge.
Clear
An overlap covering at least 20% of the smaller label, or text at least 20% outside the image.
Catch rate
Charts the model flagged for a defect, out of the charts that have it.
False-alarm rate
Charts the model flagged for a defect, out of the charts that do not have it.
95% interval
The range the true rate plausibly sits in, given how many tables were sampled.

The evidence

How often the default charts broke

434 of 600 charts (72%) had overlapping or clipped text. Nearly every bar chart broke (199 of 200): with up to 25 categories and their names written flat under the bars, the names run into each other. The title was the commonest casualty of clipping: official table titles are long, and on 294 charts the title ran past the image edge. Overlapping x labels were the overlap on 236 of the 250 charts with one; the rest were legend entries sitting on tick labels or the axis label.

Charts with a measured defect, by chart specification (200 tables, one chart of each kind per table). "Clear": the overlap covers at least 20% of the smaller label, or at least 20% of the text lies outside the image.
ChartAny defectOverlapClear overlapClippedClearly clipped
Bar chart, latest period199 of 200 (99.5%)198 of 200 (99%)198 of 200159 of 200 (80%)97 of 200
Line chart, one series115 of 200 (58%)19 of 200 (10%)1 of 200105 of 200 (53%)67 of 200
Line chart, up to 5 series120 of 200 (60%)33 of 200 (17%)17 of 200106 of 200 (53%)70 of 200
All 600 charts434 of 600 (72%)250 of 600 (42%)216 of 600370 of 600 (62%)234 of 600

What the models caught

Both models caught most defects of both types, with false alarms between 1% and 7%.

Catch rate and false-alarm rate per model and defect type; the thin line is the 95% interval, allowing for tables

Caught: flagged, of charts with the defectFalse alarm: flagged, of charts without it

Catch rate and false-alarm rate by model and defect type, with 95% intervals0%25%50%75%100%Claude Sonnet 5.5, overlapping textClaude Sonnet 5.5 flagged overlapping text on 222 of 250 charts that have it: 88.8% (95% interval 83 to 93%, allowing for tables).89%Claude Sonnet 5.5 flagged overlapping text on 9 of 350 charts without it: 2.6% (95% interval 1 to 5%, allowing for tables).3%GPT-6.1 Sol, overlapping textGPT-6.1 Sol flagged overlapping text on 249 of 250 charts that have it: 99.6% (95% interval 98 to 100%, allowing for tables).99.6%GPT-6.1 Sol flagged overlapping text on 4 of 350 charts without it: 1.1% (95% interval 0 to 4%, allowing for tables).1%Claude Sonnet 5.5, clipped textClaude Sonnet 5.5 flagged clipped text on 363 of 370 charts that have it: 98.1% (95% interval 95 to 99%, allowing for tables).98%Claude Sonnet 5.5 flagged clipped text on 12 of 230 charts without it: 5.2% (95% interval 3 to 10%, allowing for tables).5%GPT-6.1 Sol, clipped textGPT-6.1 Sol flagged clipped text on 365 of 370 charts that have it: 98.6% (95% interval 96 to 100%, allowing for tables).99%GPT-6.1 Sol flagged clipped text on 17 of 230 charts without it: 7.4% (95% interval 4 to 13%, allowing for tables).7%
Catch and false-alarm rates with two 95% intervals: one allowing for tables (added after the results), one treating every chart as independent (Wilson, as declared; too narrow where a table's three charts tend to agree, because they share their text). "Either": a chart with either defect counts as caught if the model flagged either type, as declared; "right type" (added after the results) counts it only if the model flagged a type the chart has. False alarms are counted on the charts with neither.
DefectModelCaughtInterval, tablesInterval, WilsonFalse alarmsInterval, tablesInterval, WilsonCaught, clear defects only
Overlapping textClaude Sonnet 5.5222 of 250 (88.8%)83 to 93%84 to 92%9 of 350 (2.6%)1 to 5%1 to 5%216 of 216 (100%)
Overlapping textGPT-6.1 Sol249 of 250 (99.6%)98 to 100%98 to 100%4 of 350 (1.1%)0 to 4%0 to 3%215 of 216 (99.5%)
Clipped textClaude Sonnet 5.5363 of 370 (98.1%)95 to 99%96 to 99%12 of 230 (5.2%)3 to 10%3 to 9%229 of 234 (98%)
Clipped textGPT-6.1 Sol365 of 370 (98.6%)96 to 100%97 to 99%17 of 230 (7.4%)4 to 13%5 to 12%230 of 234 (98%)
EitherClaude Sonnet 5.5418 of 434 (96.3%)93 to 98%94 to 98%10 of 166 (6.0%)3 to 12%3 to 11%not split
EitherGPT-6.1 Sol430 of 434 (99.1%)97 to 100%98 to 100%13 of 166 (7.8%)4 to 15%5 to 13%not split
Either, right typeClaude Sonnet 5.5417 of 434 (96.1%)93 to 98%not computedas aboveas aboveas abovenot split
Either, right typeGPT-6.1 Sol430 of 434 (99.1%)97 to 100%not computedas aboveas aboveas abovenot split

Counting a chart as caught only when the model named a defect it has changes little: 417 of 434 for Claude Sonnet 5.5 and 430 of 434 for GPT-6.1 Sol.

Clear defects were caught almost every time by both models. The difference is in the subtle ones. On the 34 charts whose largest overlap covers less than 20% of a label (date labels on line charts touching by a few pixels), GPT-6.1 Sol flagged 34 and Claude Sonnet 5.5 6 (95% interval 7 to 39%, allowing for tables). On every one of the 28 charts where they disagreed, from 16 tables, GPT-6.1 Sol flagged and Claude Sonnet 5.5 did not. That is this sample: the split was chosen after the results, on 34 charts from 18 tables, and needs a fresh sample to confirm. Every overlap Claude Sonnet 5.5 missed was of this kind.

Where the misses are: Claude Sonnet 5.5's overlap catch falls on line charts, where the overlaps are a few pixels between date labels. Bar: the bar chart; Line: one series; 5 lines: up to five series.
ChartClaude Sonnet 5.5GPT-6.1 Sol
CaughtFalse alarmsCaughtFalse alarms
Bar, overlap198 of 1980 of 2198 of 1980 of 2
Bar, clipped157 of 1594 of 41158 of 1596 of 41
Line, overlap5 of 192 of 18119 of 192 of 181
Line, clipped102 of 1055 of 95103 of 1056 of 95
5 lines, overlap19 of 337 of 16732 of 332 of 167
5 lines, clipped104 of 1063 of 94104 of 1065 of 94

Three charts, worked through

Twelve charts from each class, picked at random with a fixed seed and sorted by the size of the defect. Each image is the exact chart the models saw, with the measured boxes outlined: overlapping textclipped text, outlined where it meets the edge Below each is what each model said, quoted from its reply and shortened.

What went wrong or was missed

What to use when

CheckUse it whenWhat it misses
Measure the renderer's text boxesYou draw the charts yourself, in any library that reports text extents (matplotlib, a browser's own text boxes for web charts). It is exact and runs on every chart.Anything that is not text: a legend frame over labels, colours that cannot be told apart, a misleading axis.
A vision model on the imageYou only have the picture: a screenshot of a tool you do not control, a PDF, a slide. Here it flagged 96% to 99% of broken charts, on charts like these.For one model, subtle overlaps of a few pixels. It also flagged 6% to 8% of clean charts here, so a person still has to look at what it flags, and both rates need measuring again on your own inputs.
A personA chart goes in front of an executive or the public, where judgment about what the chart says matters more than layout.Volume: nobody checks every scheduled chart, every day.

Recommendation: the box check first, as a gate in the code that draws the chart; the vision model only where the box check cannot reach; a person on what either flags.

How to roll this out with a team

  1. Week one, analytics engineering. Add the box check to the shared chart helper: draw, read the text boxes, fail the job or attach a warning when two cross or one leaves the image. Start it in warning mode and count.
  2. Week two, the team that owns the reports. Look at what it flagged and fix the defaults that cause most of it (here: flat category names on bar charts and long titles). Then switch it to blocking for scheduled reports.
  3. For charts you do not draw (a vendor dashboard, a partner's PDF), a vision model with a prompt that names the defects, its answers sent to a person, never auto-fixed.
  4. Every month. Re-run the model on a sample the box check has measured, as here, and report both rates. A model update can move either one.
  5. Bad news upward. One line in the monthly reporting review: charts blocked, charts fixed, charts sent with a known defect and why.

What it is worth

The assumptions below were set after the results and are not data: a team that sends 2,000 charts a month, a person who checks 120 charts an hour at US$80 an hour, and 2 days at US$640 a day to build the box check.

The case for the box check is not the money, which is small either way. It is that it never misses a defect it defines and never argues about a threshold, so it can block a job without a person in the loop.

Where AI fits

This study is a test of AI as a reviewer, built the way any AI check should be: ask it questions whose answers are already known, compare its answers with the known ones like a control group, and only then decide where it goes. Here the known answers come from the renderer, for free, on every chart. That makes the model the second check, not the first: useful where the exact one cannot reach, and worth re-measuring the same way whenever the model or the prompt changes.

Method and checks

The data

Statistics Canada tables through its Web Data Service, under the Statistics Canada Open Licence. Adapted from Statistics Canada, the tables listed in the download, latest periods available when the sample was drawn. This does not constitute an endorsement by Statistics Canada of this product.

Sample: every current table in the service's table list, shuffled with a fixed seed, taken in order until 200 tables could give all three charts (at least 3 categories with a value at the latest period, and at least 2 series with 6 or more periods); 515 tables were tried. Per table, the dimension with the most members is the category dimension; its first 25 members in the service's order are the categories; every other dimension is held at its first member, usually a total; the latest 12 periods are requested. The unit label is the unit's name from the service, with the scale word added. The table used to develop the chart code is not in the sample.

The charts

matplotlib 3.10 with its default style, size (640 by 480 pixels) and fonts, no layout call, no label rotation, no limits. Bar: the latest period across the categories; title is the table's title, x label the category dimension, y label the unit. Line: the first category with 6 or more periods. Lines: up to 5 such categories with a default legend. These specifications were fixed before the sample was drawn.

The defect definitions

Visible text: the title, axis labels, the tick labels matplotlib draws, the offset text, legend entries and legend title. Boxes come from the renderer, in image pixels. Overlap: two boxes, each cut to the image, cross by at least 2 pixels in width and 2 in height; clear if the crossing covers at least 20% of the smaller box. Clipped: a box runs at least 2 pixels past an image edge; clear if at least 20% of its area is outside. A secondary ink check drew each overlapping pair alone and counted pixels where both have ink: every one of the 250 overlapping charts had at least one pair with shared ink, so no chart's overlap rests on a box artefact alone (163 of the 19,030 overlapping pairs share no ink).

Worked examples fixed in the design before the sample, on the development table: two province names under a bar chart crossing over 53 by 14 pixels (an overlap, clear); a long title whose box ends 1.6 pixels inside the image (not clipped); two y labels touching over 1.5 pixels of height (not an overlap, under 2 pixels).

The models and the prompt

Claude Sonnet 5.5 (default settings) and GPT-6.1 Sol, each with the image attached. One run per chart. Both got the chart PNG exactly as measured and this prompt:

This image is a chart that is about to be published. Check it for two problems only.
1. Overlapping text: a piece of text (title, axis label, tick label, legend entry) that overlaps another piece of text.
2. Clipped text: a piece of text that is cut off by the edge of the image.
Reply with JSON only, no other text, in this form:
{"overlap": true or false, "overlap_where": "which text, or empty", "clipped": true or false, "clipped_where": "which text, or empty"}

A reply was parsed as the last JSON block in it. A reply that could not be read was asked again once; none was excluded.

Scoring

Per model and defect type: catch rate (flagged, of the charts with the defect) and false-alarm rate (flagged, of the charts without it), always together, with Wilson 95% intervals as declared (intervals that allow for tables are under Changes after the results); the same on clear defects; and per chart specification. "Either" counts a defective chart as caught if the model flagged either type, and false alarms on charts with neither. The gallery takes 12 charts per class with a fixed seed. The counts of what was clipped and what overlapped, the measuring-line reading of the false alarms and the worked examples were read after the results.

Changes after the results

Each was decided after the results; the frozen scoring stays as declared, and every changed figure is shown beside it.

  • Intervals that allow for the table (added after the results). A Wilson interval on the effective number of charts: the count divided by the design effect, which compares the spread of each rate across tables with what independent charts would give, never taken below 1. Design effects here run up to 2.2; 4 of the 19 rates come out at or below 1, or cannot be estimated, and keep the declared interval. A percentile bootstrap that resampled tables gave intervals narrower than the declared ones near 0% and 100%, so it is not used. The population these describe: current Statistics Canada tables that can give all three charts, drawn with these three chart specifications.
  • A unit check (added after the results). Each sampled table's metadata and latest data point per category were read again from the service and the extraction's unit rule applied to every category, not only the first: 11 bar charts and 6 multi-line charts mix units; a one-series chart cannot. The rates are shown without them; the frozen extracts and results are unchanged.
  • The right-type catch rate (added after the results). The declared "either" rate counts a chart with either defect as caught if the model flagged either type; the right-type rate requires a flagged type the chart has.
  • Also read after the results: the split of overlaps into clear and subtle for the headline (the clear definition itself was declared), the paired comparison on subtle overlaps, the charts with a label mostly outside the image, and the measuring-line reading of false alarms.
Predictions, declared before the runs

2 held, 5 missed, and the declared opposite finding happened. The design, definitions, chart specifications, prompt and these predictions were committed before the sample was drawn, and none changed after.

  • Missed: Between 25% and 60% of the 600 charts have at least one defect (overlap or clipped).
  • Held: Bar charts have the highest defect rate of the three specifications, and most bar-chart defects are overlapping x tick labels.
  • Missed: Each model catches between 40% and 80% of charts with an overlap.
  • Missed: Each model catches clipping on a smaller share of clipped charts than it catches overlap on overlapping charts.
  • Missed: Each model flags overlap on at least 10% of charts without an overlap.
  • Missed: Each model's catch rate on clear overlaps is higher than on all overlaps.
  • Happened: Opposite finding, declared so it can be seen if it happens: some model catches 90% or more of overlapping charts with a false-alarm rate of 10% or less.
  • Held: At least 80% of overlapping text pairs also share glyph ink. Safe bet: default tick labels sit on one line, so overlapping boxes usually overlap letters.

The prediction about clear overlaps missed by one chart: GPT-6.1 Sol caught 215 of 216 clear overlaps, a hair under its 99.6% on all overlaps.

This page's own charts

The same two definitions were applied to the text the browser draws in every chart on this page, at phone width (390 px) and desktop width (1366 px): 2 charts, 56 text boxes over the two widths, no two text boxes overlapping by 2 px or more, and no text 2 px or more past its chart's edge. The page passed. The gallery images are the study's subject and are not counted.

Use this at your company

To check the charts your own code draws, paste this into your AI assistant along with the drawing code.

This method comes from Diogo Travassos's study "Default charts on real tables: what breaks, and what a vision model catches" (https://diogotravassos.dev/default-chart-defects/). If you can open links, read it first: it measures default charts of real tables and tests two vision models against the measurement. The steps below stand on their own if you can't.

Help me check the charts our code draws for two layout defects: text that overlaps other text, and text cut off by the edge of the image. I will paste the code that draws them (or name the library) and a few example tables.

Method:
1. Measure, do not judge. After each chart is drawn, read the box of every piece of text from the renderer (matplotlib: get_window_extent on the title, axis labels, tick labels, offset text and legend texts; a web chart: the browser's getBoundingClientRect on each text element).
2. Fix the definitions before counting, with examples: an overlap is two text boxes crossing by at least 2 pixels both ways; clipped is a box running at least 2 pixels past the image edge. Also count clear cases (an overlap covering at least 20% of the smaller label, or at least 20% of the text outside the image).
3. Write the check as a function that returns the defects for one chart, test it on a chart with planted overlaps and a planted long title, then run it on our charts and report how many have each defect, by chart type.
4. Only if we also need to review charts we cannot measure (screenshots, PDFs), test a vision model against the measured charts first: ask it, per chart, for a yes or no on each defect, and report its catch rate (flagged, of charts with the defect) and its false-alarm rate (flagged, of clean charts) side by side.

Report back: the check as code we can put in the drawing step, the defect counts by chart type, the most common cause and the default to change, and, if a model was tested, both of its rates. Never report a model's catch rate without its false-alarm rate.

In your report, say which study you followed and link it: https://diogotravassos.dev/default-chart-defects/