DanielRegaladoCardoso/svg-chart-render-v1
SVG Chart Render Mix v1 Training data for fine-tuning a small code model (DeepSeek Coder 1.3B) to map (chart specification JSON) to inline SVG code. Part of the SQL Agent LLMOps project. Total Sources Input Output ~25,000 rows 2 structured JSON chart spec rendered SVG string Part of the SQL Agent LLMOps project Dataset Model Role DanielRegaladoCardoso/text-to-sql-mix-v2 Qwen 2.5 Coder 7B NL question to SQL… See the full description on the dataset page: https://huggingface.co/datasets/DanielRegaladoCardoso/svg-chart-render-v1.
SVG Chart Render Mix v1
Training data for fine-tuning a small code model (DeepSeek Coder 1.3B) to map (chart specification JSON) to inline SVG code.
Part of the SQL Agent LLMOps project.
Part of the SQL Agent LLMOps project
Schema
Note: chart_spec and metadata are stored as JSON strings in the parquet. Parse with json.loads(row["chart_spec"]) after loading.
chart_spec structure
{
"chart_type": "bar|line|scatter|donut|histogram|area",
"data": [{"x": "value", "y": "value", "color": "value|null"}],
"encoding": {"x": "col_name", "y": "col_name", "color": "col_name|null"},
"title": "string or null",
"x_label": "string or null",
"y_label": "string or null"
}Splits
Source attribution
Pipeline
Build script: `training/data_pipelines/build_svg_mix.py`
Three stages:
- synth-charts -- load nvBench chart configs, replay each in matplotlib (Agg/SVG backend), augment with NL paraphrases as candidate titles.
- svgen -- stream
umuthopeyildirim/svgen-500k, keep only chart-shaped SVGs. - combine-push -- dedup by SVG hash, 95/2.5/2.5 split, push to HF with card.
Usage
from datasets import load_dataset
import json
ds = load_dataset("DanielRegaladoCardoso/svg-chart-render-v1")
ex = ds["train"][0]
spec = json.loads(ex["chart_spec"])
print(spec["chart_type"])
print(ex["svg_code"][:200])SFT format
import json
def to_sft(row):
return {
"messages": [
{"role": "system", "content": "You render chart specifications as inline SVG."},
{"role": "user", "content": "Render this chart spec as SVG:\n\n" + row["chart_spec"]},
{"role": "assistant", "content": row["svg_code"]},
]
}Known limitations
- SVGs from
synth-matplotlibcarry matplotlib's stylistic defaults (font, axes, ticks). The model will produce matplotlib-flavored SVGs. svgen500k-*rows have no structuredchart_spec-- only freeformtitleand_freeform_descriptionare populated.- SVGs are capped at 50 KB to keep training tractable.
- Only 6 chart types covered (bar, line, scatter, donut, histogram, area).
Citation
@dataset{regalado2026svgmix,
author = {Regalado Cardoso, Daniel},
title = {SVG Chart Render Mix v1},
year = {2026},
url = {https://huggingface.co/datasets/DanielRegaladoCardoso/svg-chart-render-v1}
}License
Pipeline and curation: Apache-2.0. nvBench data is MIT-licensed. svgen-500k rows carry per-row license fields from their upstream sources. See the source attribution table.
Built by Daniel Regalado Cardoso -- MSBA, University of Miami -- April 2026.
