File size: 16,187 Bytes
52130b9
54a45d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7ef686d
54a45d7
 
7ef686d
 
54a45d7
 
7ef686d
 
575d8bf
 
7ef686d
 
e3dfaaa
 
7ef686d
 
e3dfaaa
 
7ef686d
54a45d7
7ef686d
54a45d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0953184
54a45d7
 
 
0953184
54a45d7
 
 
40515f7
7ef686d
54a45d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0953184
54a45d7
 
 
0953184
54a45d7
 
 
40515f7
7ef686d
575d8bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7ef686d
e3dfaaa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7ef686d
e3dfaaa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52130b9
54a45d7
321f965
 
 
 
973795a
321f965
 
163223e
 
321f965
 
 
 
 
 
 
 
54a45d7
321f965
54a45d7
321f965
77f732b
321f965
54a45d7
0179ad4
54a45d7
3904991
54a45d7
575d8bf
54a45d7
321f965
 
 
6ee16bd
321f965
0179ad4
54a45d7
e3dfaaa
54a45d7
321f965
 
 
 
 
 
 
 
7ef686d
321f965
 
 
 
 
7ef686d
321f965
 
 
 
575d8bf
7ef686d
575d8bf
 
 
 
e3dfaaa
7ef686d
e3dfaaa
 
 
 
 
7ef686d
e3dfaaa
 
 
 
321f965
54a45d7
 
 
 
 
 
 
 
 
7ef686d
54a45d7
321f965
 
 
 
 
 
 
 
 
 
54a45d7
e3dfaaa
 
7ef686d
e3dfaaa
0179ad4
54a45d7
575d8bf
eea6428
54a45d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
575d8bf
 
 
 
 
 
 
 
 
 
54a45d7
 
 
 
 
 
 
 
 
 
0179ad4
54a45d7
21abbda
54a45d7
 
21abbda
 
 
54a45d7
21abbda
54a45d7
 
 
e3dfaaa
 
 
 
 
 
 
54a45d7
 
 
 
 
 
575d8bf
54a45d7
 
 
 
 
 
 
 
7ef686d
54a45d7
0179ad4
54a45d7
7ef686d
54a45d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7ef686d
54a45d7
 
 
0953184
54a45d7
0179ad4
54a45d7
 
 
 
 
 
 
 
 
0179ad4
54a45d7
 
 
 
 
973795a
54a45d7
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
---
license: cc-by-nc-4.0
language:
- en
pretty_name: ChartAnno
tags:
- benchmark
- chart annotation
- code generation
- multimodal
- matplotlib
- visualization
task_categories:
- text-generation
- image-to-text
size_categories:
- 1K<n<10K
arxiv: 2608.03464
configs:
- config_name: 1_python_code_image
  data_files:
  - split: train
    path: 1_python_code_image/train-*
- config_name: 2_python_code_only
  data_files:
  - split: train
    path: 2_python_code_only/train-*
- config_name: 3_python_image_only
  data_files:
  - split: train
    path: 3_python_image_only/train-*
- config_name: 4_d3_code_only
  data_files:
  - split: train
    path: 4_d3_code_only/train-*
- config_name: 5_svg_code_only
  data_files:
  - split: train
    path: 5_svg_code_only/train-*
dataset_info:
- config_name: 1_python_code_image
  features:
  - name: id
    dtype: string
  - name: category
    dtype: string
  - name: sample_id
    dtype: string
  - name: level
    dtype: string
  - name: input_type
    dtype: string
  - name: instruction
    dtype: string
  - name: GT w/o anno code
    dtype: string
  - name: gt_wo_anno_chart
    dtype: image
  - name: GT code
    dtype: string
  - name: gt_chart
    dtype: image
  splits:
  - name: train
    num_examples: 3600
- config_name: 2_python_code_only
  features:
  - name: id
    dtype: string
  - name: category
    dtype: string
  - name: sample_id
    dtype: string
  - name: level
    dtype: string
  - name: input_type
    dtype: string
  - name: instruction
    dtype: string
  - name: GT w/o anno code
    dtype: string
  - name: gt_wo_anno_chart
    dtype: image
  - name: GT code
    dtype: string
  - name: gt_chart
    dtype: image
  splits:
  - name: train
    num_examples: 3600
- config_name: 3_python_image_only
  features:
  - name: id
    dtype: string
  - name: category
    dtype: string
  - name: sample_id
    dtype: string
  - name: level
    dtype: string
  - name: input_type
    dtype: string
  - name: instruction
    dtype: string
  - name: GT w/o anno code
    dtype: string
  - name: gt_wo_anno_chart
    dtype: image
  - name: GT code
    dtype: string
  - name: gt_chart
    dtype: image
  splits:
  - name: train
    num_examples: 3600
- config_name: 4_d3_code_only
  features:
  - name: id
    dtype: string
  - name: category
    dtype: string
  - name: sample_id
    dtype: string
  - name: level
    dtype: string
  - name: input_type
    dtype: string
  - name: instruction
    dtype: string
  - name: GT w/o anno code
    dtype: string
  - name: gt_wo_anno_chart
    dtype: image
  - name: GT code
    dtype: string
  - name: gt_chart
    dtype: image
  splits:
  - name: train
    num_examples: 360
- config_name: 5_svg_code_only
  features:
  - name: id
    dtype: string
  - name: category
    dtype: string
  - name: sample_id
    dtype: string
  - name: level
    dtype: string
  - name: input_type
    dtype: string
  - name: instruction
    dtype: string
  - name: GT w/o anno code
    dtype: string
  - name: gt_wo_anno_chart
    dtype: image
  - name: GT code
    dtype: string
  - name: gt_chart
    dtype: image
  splits:
  - name: train
    num_examples: 360
---

<p align="center">
  <img src="assets/logo.png" width="130" alt="ChartAnno logo">
</p>

<h1 align="center">ChartAnno: Benchmarking Multimodal Large Language Models for Chart Annotation Generation</h1>

<p align="center">
  <a href="https://chartanno.github.io/"><img src="https://img.shields.io/badge/Homepage-chartanno.github.io-teal.svg" alt="Homepage"></a>
  &nbsp;
  <a href="https://arxiv.org/abs/2608.03464"><img src="https://img.shields.io/badge/arXiv-2608.03464-b31b1b.svg" alt="arXiv"></a>
  &nbsp;
  <a href="https://github.com/ChartAnno/ChartAnno"><img src="https://img.shields.io/badge/GitHub-ChartAnno-24292e.svg?logo=github" alt="GitHub"></a>
  &nbsp;
  <a href="https://huggingface.co/datasets/chartanno/ChartAnno"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Dataset-chartanno%2FChartAnno-ffd21f.svg" alt="HuggingFace Dataset"></a>
  &nbsp;
  <a href="https://creativecommons.org/licenses/by-nc/4.0/"><img src="https://img.shields.io/badge/License-CC%20BY--NC%204.0-blue.svg" alt="License"></a>
</p>

<h3 align="center">The official dataset repository of ChartAnno</h3>

<p align="center">
  <b>1,200</b> real-world charts &nbsp;·&nbsp; <b>3,600</b> instructions &nbsp;·&nbsp; <b>10,800</b> instances (+720 D3/SVG) &nbsp;·&nbsp; <b>3</b> representations &nbsp;·&nbsp; <b>17</b> chart types
</p>

## 1. Data Overview

Annotations are essential to communicative visualization, helping explain data, emphasize key findings, and guide attention. **ChartAnno** is a benchmark for evaluating multimodal large language models (MLLMs) on **chart annotation generation**: given an existing chart (as executable code, optionally with the rendered image) and an annotation instruction, the model generates executable code that adds the requested annotations.

ChartAnno includes **1,200 real-world charts**, each with a paired **annotated / unannotated ground-truth** (code + rendered image) pair. Every chart is paired with annotation instructions across three levels of specificity — **Intent**, **Operation**, and **Implementation** — yielding **3,600 instruction instances**. The primary benchmark tests **two input settings** (`Input: code` and `Input: code+Image`) for **7,200 model input instances**; a supplementary `Input: Image` setting adds **3,600 image-only instances**, and a 120-chart **D3.js / SVG extension** adds **720** more. Across the benchmark the same task is instantiated in **three representations** — Python, D3.js, and SVG.

<p align="center">
  <img src="assets/main-chart.png" width="95%" alt="ChartAnno task design">
</p>
<p align="center"><sub>Task design of ChartAnno. Primary chart inputs are Code or Code + Chart Image, with annotation instructions ranging from abstract Intent through Operation to concrete Implementation. For each chart input–instruction combination, the MLLM generates annotated code and its rendered chart, evaluated with reference to the unannotated code, instruction, and annotated ground truth.</sub></p>

## 2. Task Formats

The dataset is organized into **configs**, one per input setting:

<table align="center">
<tr>
  <th align="center">Config</th>
  <th align="center">Input setting</th>
  <th align="center">Model input</th>
  <th align="center">Ground truth</th>
</tr>
<tr>
  <td align="center"><code>1_python_code_image</code></td>
  <td align="center">Input: code+Image</td>
  <td align="center">Instruction + unannotated chart code + chart image</td>
  <td align="center">Annotated code + annotated chart</td>
</tr>
<tr>
  <td align="center"><code>2_python_code_only</code></td>
  <td align="center">Input: code</td>
  <td align="center">Instruction + unannotated chart code</td>
  <td align="center">Annotated code + annotated chart</td>
</tr>
<tr>
  <td align="center"><code>3_python_image_only</code></td>
  <td align="center">Input: Image</td>
  <td align="center">Instruction + unannotated chart image</td>
  <td align="center">Annotated code + annotated chart</td>
</tr>
<tr>
  <td align="center"><code>4_d3_code_only</code></td>
  <td align="center">Input: code (D3.js)</td>
  <td align="center">Instruction + unannotated D3.js code</td>
  <td align="center">Annotated D3.js code + annotated chart</td>
</tr>
<tr>
  <td align="center"><code>5_svg_code_only</code></td>
  <td align="center">Input: code (SVG)</td>
  <td align="center">Instruction + unannotated SVG document</td>
  <td align="center">Annotated SVG document + annotated chart</td>
</tr>
</table>

Each instance carries one of three instruction levels:

| Level | Description |
| --- | --- |
| `intent` | Abstract communicative goal, e.g. "emphasize the strongest market". The model must infer what to annotate. |
| `operation` | Concrete annotation operations, e.g. "add an arrow pointing to the peak and a text label with its value". |
| `implementation` | Fully specified implementation details, e.g. exact label text, colors, and positions. |

An example pair from the `1_python_code_image` config (`Area_33`): the model receives the unannotated chart on the left (with its code) and produces the annotated version on the right.

<table align="center">
<tr>
  <th align="center">Input: GT w/o anno chart</th>
  <th align="center">Expected output: GT chart</th>
</tr>
<tr>
  <td align="center"><img src="assets/example_unannotated.jpg" width="400" alt="Unannotated input chart"></td>
  <td align="center"><img src="assets/example_annotated.jpg" width="400" alt="Annotated ground-truth chart"></td>
</tr>
</table>

### D3.js / SVG extension (code-only)

Besides the main Python benchmark, the dataset ships a **D3.js and SVG extension**: **120 real-world charts** (14 chart types), each paired with instructions across the same three levels — **360 rows per backend** (`4_d3_code_only`, `5_svg_code_only`). Rows follow the same schema as `2_python_code_only`; ids carry a `_d3` / `_svg` suffix, and the code files (`.js` / `.svg`) plus full-resolution images are included in `chartanno_d3_svg.tar.gz`.

## 3. Data Statistics

The statistics below are computed on the main Python benchmark; the D3/SVG extension follows the same construction.

**Overall scale**

| Statistic | Value |
| --- | --- |
| GT pair and GT w/o anno pair | 1,200 |
| Instruction instances | 3,600 |
| Annotation elements | 25,772 |

**Annotation complexity**

| Statistic | Value |
| --- | --- |
| Avg. elements per chart | 21.48 |
| Std. elements per chart | 35.32 |
| Avg. annotation types per chart | 2.17 |
| Std. annotation types per chart | 1.04 |

**Instruction length (words)**

| Level | Avg. | Std. |
| --- | --- | --- |
| Intent | 66.39 | 52.97 |
| Operation | 95.06 | 63.57 |
| Implementation | 108.74 | 79.78 |

**Code length (tokens)**

| Code | Avg. | Std. |
| --- | --- | --- |
| Annotated | 1535.68 | 972.38 |
| Unannotated | 1075.22 | 790.45 |
| Increment | 460.46 | 385.17 |

**Code token increment across representations (120-chart extension)**

On the same 120 charts, the annotation increment differs substantially across representations:

| Representation | Avg. code token increment | Relative to Python |
| --- | --- | --- |
| Python | 395.0 | 1.00× |
| D3.js | 1374.2 | 3.48× |
| SVG | 2612.7 | 6.61× (1.90× D3) |

**Chart type distribution (17 types)**

| Type | Multi | Line | Bar | Scatter | Errorpoint | Heatmap | Pie | Area | Histogram |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Count | 303 | 247 | 213 | 94 | 47 | 44 | 44 | 33 | 32 |

| Type | Combination | Violin | Radar | Density | Treemap | Box | Contour | Dot | Total |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| Count | 31 | 20 | 19 | 19 | 17 | 16 | 15 | 6 | 1,200 |

## 4. Download Link

This dataset is gated: click **Request access** on the repo page first. Once granted, you can download the whole dataset with a read token ([settings/tokens](https://huggingface.co/settings/tokens)):

```shell
pip install -U huggingface_hub
hf login --token $HF_TOKEN        # or: hf auth login

mkdir ChartAnno && cd ChartAnno   # cd to the target directory
hf download chartanno/ChartAnno chartanno.tar.gz --repo-type dataset --local-dir .
tar -xzvf chartanno.tar.gz
```

The optional D3/SVG extension ships as a separate archive:

```shell
hf download chartanno/ChartAnno chartanno_d3_svg.tar.gz --repo-type dataset --local-dir .
tar -xzvf chartanno_d3_svg.tar.gz   # extracts to ./d3_svg_data
```

The file structure of the dataset is as follows:

```text
data/
├── input_code.jsonl              # Input: code task, 3,600 rows
├── input_code_image.jsonl        # Input: code+Image task, 3,600 rows
├── input_image_only.jsonl        # Input: Image task, 3,600 rows
├── manifest.json                 # row-count summary and schema description
├── README.md
└── images/
    ├── GT_chart/                 # 1,200 annotated ground-truth charts (jpg)
    │   ├── Area/  Bar/  ...      # one subdirectory per chart type (17 types)
    └── GT_w_o_anno_chart/        # 1,200 unannotated charts, same layout
```

The [Dataset Viewer](https://huggingface.co/datasets/chartanno/ChartAnno/viewer/1_python_code_image/train) above serves the **full dataset**: all 3,600 rows per config are loadable via `load_dataset("chartanno/ChartAnno", "<config>")` (configs `1_python_code_image`, `2_python_code_only`, `3_python_image_only` are the main benchmark; `4_d3_code_only` / `5_svg_code_only` are the extension). Chart images in the viewer parquet are embedded as compressed JPEG thumbnails for fast previewing; the full-resolution images are included in `chartanno.tar.gz`.

## 5. Data Fields

We take an instance from the `1_python_code_image` config as an example (`Area_1_intent_code_image`, long values truncated):

```json
{
  "id": "Area_1_intent_code_image",
  "category": "Area",
  "sample_id": "Area_1",
  "level": "intent",
  "input_type": "Input: code+Image",
  "instruction": "You are an expert in chart annotation and Python visualization. I have created a figure but have not added any annotations yet. ...",
  "GT w/o anno code": "import matplotlib.pyplot as plt\nimport numpy as np\nmonths = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\nvisitors = [12, 120, 229, 990, 4104, 3250, 5720, 43152, ...",
  "GT w/o anno chart": "data/images/GT_w_o_anno_chart/Area/Area_1.jpg",
  "GT code": "import matplotlib.pyplot as plt\nimport numpy as np\nmonths = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']\nvisitors = [12, 120, 229, 990, 4104, 3250, 5720, 43152, ...",
  "GT chart": "data/images/GT_chart/Area/Area_1.jpg"
}
```

Details of the data fields are as follows:

| Field | Description |
| --- | --- |
| `id` | Stable row id: `<sample_id>_<level>_code` or `<sample_id>_<level>_code_image`. |
| `category` | Chart type, one of 17 types (e.g. `Area`, `Bar`, `Line`). |
| `sample_id` | Source chart id, `<Category>_<n>` (e.g. `Area_1`). |
| `level` | Instruction level: `intent`, `operation`, or `implementation`. |
| `input_type` | `Input: code` or `Input: code+Image`. |
| `instruction` | The full model input prompt: task instruction with the unannotated code embedded. |
| `GT w/o anno code` | Ground-truth chart code before annotation. |
| `GT w/o anno chart` | Path to the unannotated chart image; always `null` in the `2_python_code_only` config. |
| `GT code` | Ground-truth annotated chart code. |
| `GT chart` | Path to the annotated ground-truth chart image. |

Image paths are relative to the repository root of the extracted `data/` folder. In the viewer parquet the two image fields are named `gt_chart` / `gt_wo_anno_chart` (space-free, for Dataset Viewer compatibility) and are embedded as compressed thumbnails of these files.

## 6. Evaluation

ChartAnno comes with a self-contained evaluation pipeline (see the [GitHub repository](https://github.com/ChartAnno/ChartAnno)): it renders the generated code into charts and scores them with rule-based metrics (execution success, chart fidelity, annotation matching, color matching) and LLM-judged metrics (semantic faithfulness, semantic clarity, visual clarity, annotation organization quality, attention guidance). The final aggregate scores are:

| Aggregate | Inputs |
| --- | --- |
| Structural compliance | chart fidelity (+ annotation & color matching for operation/implementation levels) |
| Semantic consistency | semantic faithfulness, semantic clarity |
| Design effectiveness | visual clarity, annotation organization quality, attention guidance |

## 7. Citation

If you find ChartAnno useful, please consider citing our paper:

```bibtex
@article{chen2026chartanno,
      title={ChartAnno: Benchmarking Multimodal Large Language Models for Chart Annotation Generation},
      author={Zhenghan Chen and Zekai Shao and Lidan Tan and Xin Lin and Xingchen Zeng and Yi Shan and Ziyue Lin and Xiaoliang Fu and Xinyuan Liu and Yuetong Guo and Fen Wang and Bongshin Lee and Siming Chen},
      year={2026},
      journal={arXiv preprint arXiv:2608.03464},
}
```