antv-g2-chart

Installation
SKILL.md

G2 v5 Chart Visualization

Overview

G2 v5 is AntV's grammar-of-graphics charting library. It uses Spec Mode — a declarative, JSON-like configuration style where chart.options() defines the entire visualization in one call.

import { Chart } from '@antv/g2';

const chart = new Chart({ container: 'container', autoFit: true });
chart.options({
  type: 'interval',
  data: [{ genre: 'Sports', sold: 275 }],
  encode: { x: 'genre', y: 'sold' },
});
chart.render();

CDN Usage

Installs
1.1K
GitHub Stars
468
First Seen
Apr 14, 2026
antv-g2-chart — antvis/chart-visualization-skills