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();