ChartEditor: A Reinforcement Learning Framework for Robust Chart Editing
Chart editing reduces manual effort in visualization design. Typical benchmarks limited in data diversity and assume access to complete chart code, which is seldom in real-world scenarios. To address this gap, we present ChartEditVista, a comprehensive benchmark consisting of 7,964 samples spanning 31 chart categories. It encompasses diverse editing instructions and covers nearly all editable chart elements. The inputs in ChartEditVista include only the original chart image and natural language editing instructions, without the original chart codes. ChartEditVista is generated through a fully automated pipeline that produces, edits, and verifies charts, ensuring high-quality chart editing data. Besides, we introduce two novel fine-grained, rule-based evaluation metrics: the layout metric, which evaluates the position, size and color of graphical components; and the text metric, which jointly assesses textual content and font styling. Building on top of ChartEditVista, we present ChartEditor, a model trained using a reinforcement learning framework that incorporates a novel rendering reward to simultaneously enforce code executability and visual fidelity. Through extensive experiments and human evaluations, we demonstrate that ChartEditVista provides a robust evaluation, while ChartEditor consistently outperforms models with similar-scale and larger-scale on chart editing tasks.
Introduction. Chart editing aims to utilize multi-modal large language models (MLLMs) to generate chart code to make highquality visualizations reflect the customize requirements. This task is particularly practical as it significantly reduces the manual effort required for chart design and implementation. However, existing benchmarks (Yan et al. 2024a; Zhao et al. 2025a; Yang et al. 2024) either assume complete chart code access or are limited in instruction diversity, editable elements, and chart types, with a lack of large-scale training data. To address these limitations, we introduce ChartEditVista, a comprehensive benchmark for chart editing. ChartEditVista consists of 7,964 carefully curated samples with original chart images, natural language editing instructions, and corresponding modified code. It covers 31 chart types, 6 editing tasks and nearly all editable components. The benchmark is created through an automated pipeline combining scalable data generation and rigorous quality control, with multi-dimensional automated evaluation and expert manual refinement to ensure robust quality. Our analysis also reveals limitations in existing metrics for chart editing tasks. MLLM-based metrics (Zhao et al. 2025a; Yang et al. 2024) often exhibit hallucinations, while rule-based metrics (Yang et al. 2024) are inadequate for finegrained modifications. To bridge this gap, we propose two novel fine-grained rule-based metrics: layout metric and text metric, which assess graphical elements and textual content respectively. Comprehensive human evaluations show strong alignment with human judgment. Furthermore, our evaluation on ChartEditVista reveals that contemporary open-sourced MLLMs (Wang et al. 2024; Chen et al. 2024; Li et al. 2024), including chart specific models (Zhang et al. 2024; Han et al. 2023; Xu et al. 2024; Xia et al. 2024), show limited performance on chart editing tasks. To overcome these challenges, we present ChartEditor, a model specifically optimized for chart editing tasks. Built upon the Qwen2.5-VL-3B (Bai et al. 2025), our model incorporates several key innovations. First, we introduce a novel rendering reward mechanism that directly assesses chart output fidelity, which serves as the optimization objective for Group Relative Policy Optimization (GRPO) (Guo et al. 2025; Shao et al. 2024). Second, we implement a twophase training framework combining supervised fine-tuning and curriculum reinforcement learning to stable reward signals. Third, we validate the generalizability of our rendering reward by successfully applying it to the Chart-to-Code task, where it yields consistent performance improvements. Extensive experiments demonstrate that our ChartEditor- 3B achieves state-of-the-art (SoTA) performance across MLLMs with similar scale on ChartEditVista while maintaining strong generalization on out-of-domain benchmarks including ChartEdit (Zhao et al. 2025a) and Chart- Mimic (Yang et al. 2024). Notably, it consistently outperforms a range of chart-specialized models and even surpasses several larger models with 26B and 34B parameters, highlighting the effectiveness of our model and training framework. Our contributions are summarized as follows:
We introduce ChartEditVista, a chart editing benchmark containing 7,964 manually verified samples spanning 31 chart types, covering diverse editable components and editing tasks. Our robust automated chart editing data generation pipeline, complemented by manual verification, ensures data quality.
We propose the layout and text metric, which outperform existing evaluation methods in reliability and finegrained change detection. Human evaluations confirm their robustness and strong correlation with human assessments.
We present ChartEditor, a model trained using GRPO and a novel rendering reward. It achieves state-of-the-art performance on multiple benchmarks, including ChartEditVista, ChartEdit, and ChartMimic.
Related work. Chart Related Works. Charts, as a specific type of image used for data visualization, have garnered increasing research attention (Huang et al. 2024). Existing works explore chart understanding from the perspectives of code (Yang et al. 2024; Zhao et al. 2025a; Xia et al. 2024; Zhang, Ma, and Vosoughi 2024) and content (Huang et al. 2024; Masry et al. 2022; Xia et al. 2024; Chen et al. 2025; Zhang et al. 2023; Dong et al. 2024a,b; Laurenc ̧on et al. 2024; Ye et al. 2023a,b, 2024). In the specific field, Chart Editing, significant progress has been made. For instance, some studies (Yan et al. 2024a) have proposed workflow-based approaches for Chart Editing, while others (Yang et al. 2024; Zhao et al. 2025a) have introduced multi-modal guidance to facilitate end-to-end chart modification. Despite these advancements, existing benchmarks still face limitations in terms of the diversity of instruction types, the variety of editable elements, and the range of chart types supported. Furthermore, Chart-specific Model (Zhang et al. 2024; Han et al. 2023; Xu et al. 2024; Zhao et al. 2025b) lack the ability of high-quality chart editing.
Multimodal Large Language Models. Recent research in Multimodal Large Language Models (MLLMs) has made substantial strides (Liu et al. 2024, 2023a; Lin et al. 2023). For example, closed-source MLLMs such as GPTseries (Hurst et al. 2024; Achiam et al. 2023), Claudeseries (Anthropic 2024), and Gemini-series (Team et al. 2023; Comanici et al. 2025) are capable of handling complex real-world vision and language tasks. Open-source MLLMs like LLaVA (Li et al. 2024; Liu et al. 2023b), Qwen-VL (Bai et al. 2025; Wang et al. 2024), and InternVL- VL (Chen et al. 2024) also demonstrate strong performance compared to previous methods across several standard multimodal understanding benchmarks. However, these models still underperform when applied to tasks with high practical demands, such as Chart Editing.
Method. ChartEditVista Task Definition Chart editing involves generating a modified chart based on a given chart image and accompanying textual editing instructions. This task is commonly approached by predicting the underlying chart code that, once rendered, produces the desired edited chart. However, existing benchmarks often assume access to the original chart code, which is an unrealistic assumption in many real-world applications. To better align with practice, we formulate the task as follows:
Data Construction Pipeline To construct a diverse and semantically rich set on chart editing task, we adopt a multi-stage generation and filtering pipeline, as shown on Figure 2. Data Collection and Original Chart Generation. We begin by creating a chart topic pool and a chart type pool, aiming to ensure content diversity. Chart topics are generated using GPT-4.1, yielding hundreds of unique topics. We manually predefine 31 chart types to ensure a broad range of visual formats. Given a sampled chart topic and type, we employ GPT- 4.1, selected for its strong code generation and visual reasoning capabilities (OpenAI 2025), to generate synthetic data in CSV format and the corresponding Python plotting code, following the approach of ChartLlama (Han et al. 2023). To further enhance layout variability, we manually curated an attribute bank encompassing visual features such as the presence of multiple subplots, color schemes, axis configurations, and other stylistic properties. For each chart, we randomly sample a subset of attributes and incorporate them into the generation prompt to further enhance diversity. All generated code is executed for initial quality control, with non-runnable scripts discarded. To further ensure visual clarity, each rendered chart is assessed by GPT-4.1 for interpretability and rendering quality (e.g., avoiding overlaps or truncation). Charts that fail this check are excluded, ensuring a pool of high-quality, visually coherent references. Selecting Editing Targets. To generate diverse and finegrained chart editing instructions, it is crucial to first identify almost all potential editable elements within a chart. To achieve this, we utilize GPT-4.1 to convert the generated Python plotting code into a structured JSON format, referred to as the Chart JSON, which explicitly encodes all visual and textual elements present in the chart, along with their associated attribute values. We then transform the Chart JSON into a hierarchical Chart Tree, where the root node represents the entire chart, internal nodes correspond to major chart components , and leaf nodes typically denote atomic elements. This tree structure enables systematic traversal for fine-grained editing and supports diverse instructions on both visuals and data. For modify and delete operations, we randomly sample nodes from the Chart Tree as editing targets, ensuring broad coverage of editable entities. For add operations, we provide the entire Chart JSON as context to the model, enabling it to reason about where and how to insert new elements in a coherent manner. Editing Instructions and Code Generation. Given the Chart JSON and its corresponding Chart Tree, we instruct GPT-4.1 to perform two key tasks: (i) generate an initial editing instruction, and (ii) produce the corresponding edited chart code. If the sampled node is intrinsically non-editable, GPT-4.1 is instructed to skip that node and refrain from generating an instruction. We apply a rigorous quality control protocol for the generated modify instructions and edited chart codes. As with reference charts, any edited code that fails to render a valid chart is discarded. Moreover, we prompt GPT-4.1 to refine the instruction based on the original and edited code, ensuring all the final instructions accurately and naturally describes the performed change. Finally, we submit the reference image, the refined instruction, and the edited image to GPT-4.1 for a holistic quality assessment. This check ensures that the editing outcome is not only syntactically correct but also interpretable and faithful to the modification.
Conclusion. We present ChartEditVista, a comprehensive chart editing benchmark with broad coverage and high-quality annotations, together with two rendering-aware evaluation metrics that robustly capture fine-grained visual and textual modifications. Leveraging these resources, our ChartEditor model, trained via GRPO with a novel rendering reward and curriculum learning, achieves state-of-the-art results on both indomain and out-of-domain benchmarks. These contributions establish a new foundation for the rigorous evaluation and development of MLLMs for chart editing.
Lines of inquiry this paper opens 24
Research framings built by reading the notes related to this paper — the questions it feeds into.
Can visual rendering-based rewards effectively improve code and layout quality?- How does rendering and measuring beat vision-language models for slide assessment?
- Can bounding-box signals replace image encoders for visual output evaluation?
- Why do vision-based rewards for web generation incur substantial computational overhead?
- Can matching UI elements by text similarity and position handle visually equivalent but structurally different layouts?
- What performance gains does ALISA achieve over prior WebUI-to-Code training methods?
- Does the rendering reward generalize beyond chart editing to other code generation tasks?
- How does the rendering reward weight code executability against visual fidelity failures?
- What layout and text metrics does ChartEditor use to measure visual fidelity?
- Can Chamfer Distance and code validity capture whether designs match an engineer's intent?
- Does format reward contribute independently to CAD-Coder's final performance?
- What signals matter more for UI evaluation: rendered visuals or symbolic descriptions?
- Do quality ceiling effects appear in other visual domains beyond game UI?
- Can render-and-judge mechanisms generalize beyond chart-to-code to other executable outputs?
- Can professional design workflows integrate vector generation from pretrained vision-language models?
- Which reward component matters most: pixel reconstruction, semantic similarity, or code efficiency?
- How does visual-similarity reward resolve semantic equivalence problems in code?
- Can visual rendering rewards work for tasks beyond code reconstruction?
- What makes code-matching training brittle compared to image-matching training?
- What limits SlideCoder to single-slide generation from reference images?
- How does render-and-compare training differ from expert-judged rewards in visual tasks?
- Do vision-language models learn design taste differently than structure recognition?
- Has the MLLM visual critic been validated against human judgments of front-end quality?
- How does color-gradient segmentation compare to learned visual decomposition for slides?