# ChartQA (2022)

> 32,700 questions over 20,882 real-world bar, line and pie charts requiring reading values and doing math.

Page: https://mralbu.github.io/ai-datasets/d/chartqa

## Key facts

- Category: Vision
- Task: Visual and logical question answering over charts
- Creators: Ahmed Masry, Do Xuan Long, Jia Qing Tan, Shafiq Joty, Enamul Hoque (York University, NTU Singapore)
- Size: 20,882 charts, 32,719 questions (9,608 human-written, 23,111 augmented)
- Splits: train 28,299, val 1,920, test 2,500
- Input: A real-world chart image and a question about its bars, lines, legends or numbers
- Labels: A short numerical or text answer, tagged as human-written or machine-augmented
- License: GPL-3.0 (code and annotations); charts sourced from Statista, Pew, OWID and OECD
- Paper: [ChartQA: A Benchmark for Question Answering about Charts with Visual and Logical Reasoning](https://arxiv.org/abs/2203.10244)
- Homepage: https://github.com/vis-nlp/ChartQA
- Hugging Face: [HuggingFaceM4/ChartQA](https://huggingface.co/datasets/HuggingFaceM4/ChartQA)
- Sampled at Hub revision b605b6e08b57faf4359aeb2fe6a3ca595f99b6c5 (2026-11-22)

## Why it matters

Earlier chart datasets used synthetic matplotlib plots and template questions. ChartQA scraped real published charts from Statista, Pew Research, Our World in Data and the OECD, then asked questions that mix visual lookup ("the blue bar") with multi-step arithmetic (differences, averages, ratios). It quickly became a fixture in VLM scorecards—testing whether a model can read small axis labels, match colors to legends and calculate without hallucinating numbers.

## Worth knowing

- The test set splits evenly: 1,250 human-written questions (which often require arithmetic and visual references) and 1,250 machine-augmented questions generated from chart summaries.
- Scored with relaxed accuracy: text answers must match exactly, while numeric answers are accepted within a 5% relative tolerance.
- Because VLMs used to struggle much more on the human half than the augmented half, papers often report both subsets separately alongside the overall average.
- Every chart in the original release ships with its underlying CSV data table, letting researchers separate chart-parsing errors from reasoning errors.

## Get the data

Parquet copy of ChartQA (train, val and test) with chart images, queries, reference answers and human/machine tags.

```bash
# pip install -U huggingface_hub
hf download HuggingFaceM4/ChartQA --repo-type dataset \
  --local-dir chartqa
```

```python
from datasets import load_dataset   # pip install datasets

ds = load_dataset("HuggingFaceM4/ChartQA")
print(ds)
```

```python
import polars as pl

df = pl.read_parquet("hf://datasets/HuggingFaceM4/ChartQA@~parquet/default/test/*.parquet")
print(df.shape)
```

## Related datasets

- [PlotQA](https://arxiv.org/abs/1909.00997): 2020, 224k synthetic plots with open-vocabulary reasoning questions
- [DocVQA](https://huggingface.co/datasets/HuggingFaceM4/DocumentVQA): 2020, question answering over scanned document pages (on this site: https://mralbu.github.io/ai-datasets/d/docvqa)
- [TextVQA](https://huggingface.co/datasets/lmms-lab-encoder/textvqa): 2019, reading text inside natural photos (on this site: https://mralbu.github.io/ai-datasets/d/textvqa)
- [MMMU](https://huggingface.co/datasets/MMMU/MMMU): 2023, college-level exam questions over charts, diagrams and scans (on this site: https://mralbu.github.io/ai-datasets/d/mmmu)

## Landmark papers

- [Pix2Struct: Screenshot Parsing as Pretraining for Visual Language Understanding](https://arxiv.org/abs/2210.03347) (2022)

## Papers on this site that use it

- [Molmo (2024)](https://mralbu.github.io/ai-datasets/p/molmo.md): Matched proprietary frontier VLMs using only open weights and newly collected human speech captions and 2D pointing data—with zero distillation from closed VLMs.
- [PaliGemma (2024)](https://mralbu.github.io/ai-datasets/p/paligemma.md): Paired SigLIP and Gemma-2B with a linear projection, prefix-LM attention and unfrozen multi-resolution pretraining to build a compact 3B transfer base model.
- [Qwen2-VL (2024)](https://mralbu.github.io/ai-datasets/p/qwen2-vl.md): Replaced fixed square crops and patch grids with Naive Dynamic Resolution and Multimodal RoPE so one ViT+LLM reads images and video at their native sizes.
