antvis/G2

条形图 x 为 date 对象会报错 #5060

pearmini posted onGitHub

  • 版本:5.0.8
import { Chart } from '@antv/g2';

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

chart
  .interval()
  .data({
    type: 'fetch',
    value:
      'https://gw.alipayobjects.com/os/bmw-prod/fb9db6b7-23a5-4c23-bbef-c54a55fee580.csv',
  })
  .encode('x', () => new Date())
  .encode('y', 'frequency')
  .axis('y', { labelFormatter: '.0%' });

chart.render();

Fund this Issue

$0.00
Funded

Pull requests