vega

Create data-driven charts with Vega-Lite (declarative) and Vega (programmatic). Best for statistical visualization of numeric data — bar, line, scatter, heatmap, area, radar charts, and word clouds.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "vega" with this command: npx skills add markdown-viewer/skills/markdown-viewer-skills-vega

Vega / Vega-Lite Visualizer

Quick Start: Structure data as array of objects → Choose mark type (bar/line/point/area/arc/rect) → Map encodings (x, y, color, size) to fields → Set data types (quantitative/nominal/ordinal/temporal) → Wrap in ```vega-lite or ```vega fence. Always include $schema, use valid JSON with double quotes, field names are case-sensitive. Use Vega-Lite for 90% of charts; Vega only for radar, word cloud, force-directed.


Critical Syntax Rules

Rule 1: Always Include Schema

"$schema": "https://vega.github.io/schema/vega-lite/v5.json"

Rule 2: Valid JSON Only

❌ {field: "x",}     → Trailing comma, unquoted key
✅ {"field": "x"}    → Proper JSON

Rule 3: Field Names Must Match Data

❌ "field": "Category"  when data has "category"
✅ "field": "category"  → Case-sensitive match

Rule 4: Type Must Be Valid

✅ quantitative | nominal | ordinal | temporal
❌ numeric | string | date

Common Pitfalls

IssueSolution
Chart not renderingCheck JSON validity, verify $schema
Data not showingField names must match exactly
Wrong chart typeMatch mark to data structure
Colors not visibleCheck color scale contrast
Dual-axis issuesAdd resolve: {scale: {y: "independent"}}

Output Format

```vega-lite
{...}
```

Or for full Vega:

```vega
{...}
```

Related Files

For advanced chart patterns and complex visualizations, refer to references below:

  • examples.md — Stacked bar, grouped bar, multi-series line, area, heatmap, radar (Vega), word cloud (Vega), and interactive chart examples

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

architecture

No summary provided by upstream source.

Repository SourceNeeds Review
General

uml

No summary provided by upstream source.

Repository SourceNeeds Review
General

infographic

No summary provided by upstream source.

Repository SourceNeeds Review
General

canvas

No summary provided by upstream source.

Repository SourceNeeds Review