antvis/G2

重新渲染无法隐藏 title #5017

pearmini posted onGitHub

  • 出现问题:重新渲染无法隐藏 title
  • 版本:5.0.6
/**
 * A recreation of this demo: https://observablehq.com/@d3/bar-chart
 */
import { Chart } from '@antv/g2';

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

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

chart.render();

setTimeout(() => {
  interval.axis('y', { title: null })
  chart.render();
}, 1000)

posted by hustcc almost 2 years ago

Fund this Issue

$0.00
Funded

Pull requests