CSU-JPG/Chart2Code

Dataset

3

stars

51

commits

1

linked in READMEs

Apr 29, 2026

updated

charts
chart-understanding
code-generation
llm-evaluation
multimodal

README

From Charts to Code: A Hierarchical Benchmark for Multimodal Models

Chart2Code logo

Welcome to Chart2Code! If you find this repo useful, please give a star ⭐ for encouragement.

arXiv Project Page Code

Data Overview

Chart2Code is a hierarchical benchmark for evaluating multimodal models on chart understanding and chart-to-code generation. The dataset is organized into five Hugging Face configurations:

  • level1_direct
  • level1_customize
  • level1_figure
  • level2
  • level3

In the current Hugging Face release, Chart2Code contains 2,186 tasks in total:

  • Level 1: 863 tasks across level1_direct, level1_customize, and level1_figure
  • Level 2: 1,010 tasks
  • Level 3: 313 tasks

Chart2Code overview

The dataset spans direct chart reproduction, style-conditioned chart generation, chart editing, and spreadsheet-to-chart generation. More details are available on the project page.

Chart2Code benchmark illustration

Dataset Structure

This Hugging Face release contains both:

  • viewer-friendly Parquet shards under data/<config>/
  • the original source tree, including level*.json metadata and the referenced raw png, txt, py, csv, xlsx, and xls files
Chart2Code
├── README.md
├── assets
│   ├── figure1.png
│   ├── figure2.png
│   └── ...
├── level1_direct.json
├── level1_customize.json
├── level1_figure.json
├── level2.json
├── level3.json
├── level1_direct
│   └── ...
├── level1_customize
│   └── ...
├── level1_figure
│   └── ...
├── level2
│   └── ...
├── level3
│   └── ...
└── data
    ├── level1_direct
    │   ├── train-00000-of-00003.parquet
    │   ├── train-00001-of-00003.parquet
    │   └── train-00002-of-00003.parquet
    ├── level1_customize
    │   └── train-00000-of-00001.parquet
    ├── level1_figure
    │   └── train-00000-of-00001.parquet
    ├── level2
    │   ├── train-00000-of-00004.parquet
    │   └── ...
    └── level3
        ├── train-00000-of-00002.parquet
        └── train-00001-of-00002.parquet

If you download the repository snapshot, the original metadata and source files can be used directly with their existing relative paths.

Task Levels

  • Level 1: Chart Reproduction Includes three subsets for direct reproduction, reproduction from text-form input data, and reproduction from figure-form input data.
  • Level 2: Chart Editing Focuses on modifying an existing chart according to an instruction.
  • Level 3: Spreadsheet-to-Chart Generation Requires models to parse spreadsheet data and generate charts that match both data and style constraints.

How to Use

Load a specific subset with datasets.load_dataset:

from datasets import load_dataset

level1_direct = load_dataset("CSU-JPG/Chart2Code", "level1_direct", split="train")
level3 = load_dataset("CSU-JPG/Chart2Code", "level3", split="train")

You can also download all repro through:

from huggingface_hub import snapshot_download
snapshot_download(
      repo_id="CSU-JPG/Chart2Code",
      repo_type="dataset",
      local_dir="./Chart2Code/data",
  )

or:

huggingface-cli download CSU-JPG/Chart2Code --repo-type dataset --local-dir ./Chart2Code/data

What's New

  • [2026.4.17] We have added the Hugging Face Data Viewer functionality.
  • [2026.4.7] 🎉 Chart2Code is accepted by ACL main 2026.
  • [2025.12.2] We have further revised and filtered our dataset.

Citation

If you find Chart2Code useful in your research, please cite our paper:

@misc{tang2025chartscodehierarchicalbenchmark,
      title={From Charts to Code: A Hierarchical Benchmark for Multimodal Models},
      author={Jiahao Tang and Henry Hengyuan Zhao and Lijian Wu and Yifei Tao and Dongxing Mao and Yang Wan and Jingru Tan and Min Zeng and Min Li and Alex Jinpeng Wang},
      year={2025},
      eprint={2510.17932},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2510.17932},
}

Statement

The Level 1 data is partially derived from ChartMimic and follows the original licensing constraints of that source.

Acknowledgement

  • Special thanks to Henry Hengyuan Zhao for serving as the project leader of this work.
  • We are grateful to the annotators and baseline contributors who supported dataset construction and evaluation.

If you have any questions, please email Jiahao Tang at tangjh36@mail2.sysu.edu.cn or open an issue on the GitHub repository.

Contributors

accebet

19 commits

CSU-JPG/Chart2Code

Dataset

3

stars

51

commits

1

linked in READMEs

Apr 29, 2026

updated

charts
chart-understanding
code-generation
llm-evaluation
multimodal

README

From Charts to Code: A Hierarchical Benchmark for Multimodal Models

Chart2Code logo

Welcome to Chart2Code! If you find this repo useful, please give a star ⭐ for encouragement.

arXiv Project Page Code

Data Overview

Chart2Code is a hierarchical benchmark for evaluating multimodal models on chart understanding and chart-to-code generation. The dataset is organized into five Hugging Face configurations:

  • level1_direct
  • level1_customize
  • level1_figure
  • level2
  • level3

In the current Hugging Face release, Chart2Code contains 2,186 tasks in total:

  • Level 1: 863 tasks across level1_direct, level1_customize, and level1_figure
  • Level 2: 1,010 tasks
  • Level 3: 313 tasks

Chart2Code overview

The dataset spans direct chart reproduction, style-conditioned chart generation, chart editing, and spreadsheet-to-chart generation. More details are available on the project page.

Chart2Code benchmark illustration

Dataset Structure

This Hugging Face release contains both:

  • viewer-friendly Parquet shards under data/<config>/
  • the original source tree, including level*.json metadata and the referenced raw png, txt, py, csv, xlsx, and xls files
Chart2Code
├── README.md
├── assets
│   ├── figure1.png
│   ├── figure2.png
│   └── ...
├── level1_direct.json
├── level1_customize.json
├── level1_figure.json
├── level2.json
├── level3.json
├── level1_direct
│   └── ...
├── level1_customize
│   └── ...
├── level1_figure
│   └── ...
├── level2
│   └── ...
├── level3
│   └── ...
└── data
    ├── level1_direct
    │   ├── train-00000-of-00003.parquet
    │   ├── train-00001-of-00003.parquet
    │   └── train-00002-of-00003.parquet
    ├── level1_customize
    │   └── train-00000-of-00001.parquet
    ├── level1_figure
    │   └── train-00000-of-00001.parquet
    ├── level2
    │   ├── train-00000-of-00004.parquet
    │   └── ...
    └── level3
        ├── train-00000-of-00002.parquet
        └── train-00001-of-00002.parquet

If you download the repository snapshot, the original metadata and source files can be used directly with their existing relative paths.

Task Levels

  • Level 1: Chart Reproduction Includes three subsets for direct reproduction, reproduction from text-form input data, and reproduction from figure-form input data.
  • Level 2: Chart Editing Focuses on modifying an existing chart according to an instruction.
  • Level 3: Spreadsheet-to-Chart Generation Requires models to parse spreadsheet data and generate charts that match both data and style constraints.

How to Use

Load a specific subset with datasets.load_dataset:

from datasets import load_dataset

level1_direct = load_dataset("CSU-JPG/Chart2Code", "level1_direct", split="train")
level3 = load_dataset("CSU-JPG/Chart2Code", "level3", split="train")

You can also download all repro through:

from huggingface_hub import snapshot_download
snapshot_download(
      repo_id="CSU-JPG/Chart2Code",
      repo_type="dataset",
      local_dir="./Chart2Code/data",
  )

or:

huggingface-cli download CSU-JPG/Chart2Code --repo-type dataset --local-dir ./Chart2Code/data

What's New

  • [2026.4.17] We have added the Hugging Face Data Viewer functionality.
  • [2026.4.7] 🎉 Chart2Code is accepted by ACL main 2026.
  • [2025.12.2] We have further revised and filtered our dataset.

Citation

If you find Chart2Code useful in your research, please cite our paper:

@misc{tang2025chartscodehierarchicalbenchmark,
      title={From Charts to Code: A Hierarchical Benchmark for Multimodal Models},
      author={Jiahao Tang and Henry Hengyuan Zhao and Lijian Wu and Yifei Tao and Dongxing Mao and Yang Wan and Jingru Tan and Min Zeng and Min Li and Alex Jinpeng Wang},
      year={2025},
      eprint={2510.17932},
      archivePrefix={arXiv},
      primaryClass={cs.SE},
      url={https://arxiv.org/abs/2510.17932},
}

Statement

The Level 1 data is partially derived from ChartMimic and follows the original licensing constraints of that source.

Acknowledgement

  • Special thanks to Henry Hengyuan Zhao for serving as the project leader of this work.
  • We are grateful to the annotators and baseline contributors who supported dataset construction and evaluation.

If you have any questions, please email Jiahao Tang at tangjh36@mail2.sysu.edu.cn or open an issue on the GitHub repository.

Contributors

accebet

19 commits