antv-g2-chart

Translate natural-language chart requests into runnable G2 v5 Spec code.

454|35|Updated Jan 22, 2026
One-click install
npx skills add https://github.com/antvis/chart-visualization-skills --skill antv-g2-chart
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: antv-g2-chart
Source: https://github.com/antvis/chart-visualization-skills/tree/main/skills/antv-g2-chart
Command: npx skills add https://github.com/antvis/chart-visualization-skills --skill antv-g2-chart

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Translates natural-language chart requests into accurate, runnable G2 v5 code using Spec mode.

Core Features & Use Cases

  • Spec-compliant code generation: Outputs conform to G2 v5 Spec with type, data, encode, transform, coordinate, scale, axis, legend, and tooltip configurations.
  • Wide chart type coverage: Supports interval, line, area, pie (theta), scatter, heatmap, density, and more, with comprehensive encode channels and transforms.
  • Safe, deterministic output: Includes validation and basic error handling to ensure runnable code and predictable results.

Quick Start

Provide a dataset and a target chart type, and the Skill will generate a ready-to-run G2 v5 Spec-based chart code snippet.

Frequently Asked Questions about antv-g2-chart

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate G2 v5 chart code from natural language?

To generate G2 v5 chart code, provide a dataset and a target chart type, and the Skill translates the natural-language request into accurate, runnable Spec mode code.

Can I generate Spec configurations for pie and area charts using G2?

Yes, you can generate Spec configurations for pie, area, interval, line, scatter, heatmap, and density charts with comprehensive encode channels and transforms.

Does the generated G2 chart code include axis and legend configurations?

Yes, the generated G2 chart code includes axis and legend configurations, along with type, data, encode, transform, coordinate, scale, and tooltip settings in the output.

What is the best way to ensure generated data visualization code is runnable?

The best way to ensure generated data visualization code is runnable is using validation and basic error handling, which guarantees safe, deterministic output and predictable results.

Do I need to manually write transforms and scales when automating G2 chart creation?

No, you do not need to manually write transforms and scales, as the Skill automatically configures comprehensive encode channels, transforms, scales, and coordinates for the G2 v5 Spec.