chart-best-practices
Generate chart JSON blocks for dashboard rendering. Use when visual comparisons help explain data — quality rankings, cost comparisons, Pareto frontiers.
SKILL.mdskills/chart-best-practices/SKILL.md
GitHubChart Best Practices Skill
Charts render from JSON code blocks. Three supported schemas:
Bar / Line
{
"type": "bar",
"labels": ["Model A", "Model B", "Model C"],
"datasets": [{"label": "Quality (0-100)", "data": [53, 51, 48]}]
}
labelsanddatasets[].datamust be the same length- Use
"type": "line"for trends over time
Scatter (Pareto frontier, quality-vs-cost)
{
"type": "scatter",
"datasets": [{
"label": "Models",
"data": [
{"x": 25.0, "y": 53, "label": "Claude Opus 4.6"},
{"x": 5.0, "y": 51, "label": "Claude Sonnet 4.6"},
{"x": 1.5, "y": 47, "label": "GPT-4o"}
]
}]
}
- No
labelsarray needed — each point carries its ownlabel - Tooltip auto-shows the point's
labelfield x= cost/speed,y= quality score
Log-scale scatter (cost spans orders of magnitude)
Add options.scales to switch any axis to log scale:
{
"type": "scatter",
"options": {
"scales": {
"x": {"type": "log", "min": 0.1},
"y": {"beginAtZero": true}
}
},
"datasets": [{"label": "Models", "data": [{"x": 0.2, "y": 40, "label": "Cheap model"}, {"x": 25, "y": 53, "label": "Expensive model"}]}]
}
Rules
- No callback functions —
"callback": "value => ..."will be stripped. Use staticmin/max/beginAtZeroinstead. - No
plugins.tooltip.callbacks— tooltips on scatter use thelabelfield automatically. - Keep labels short. Use
data[].labelon scatter points for hover text. - Prefer bar/line for ranked comparisons, scatter for two-metric trade-offs (Pareto).
- Always include text explanation — never emit a chart as the only output.