AntV G2 条形图

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.coordinate().transpose();

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

chart.render();

官方文档

猜你喜欢

转载自blog.csdn.net/qq_36658051/article/details/112247149