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

const data = [
{ type: '1岁', value: 340 },
{ type: '2岁', value: 530 },
{ type: '3岁', value: 620 },
{ type: '4岁', value: 470 },
{ type: '5岁', value: 190 },
];

const chart = new Chart({
container: 'container',
autoFit: true,
});

chart.data(data);

chart.interval().position('type*value');

chart.render();

AntV G2 柱状图_vue.js

??官方文档??