antvis/G2

brushXFilter 在有空 label 的时候展示 tooltip 有误 #4930

pearmini posted onGitHub

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

const chart = new Chart({
  container: 'container',
  theme: 'classic',
  width: 900,
  height: 1000,
  paddingRight: 80,
});

chart.coordinate({ transform: [{ type: 'transpose' }] });

chart
  .interval()
  .data({
    type: 'fetch',
    value: 'https://assets.antv.antgroup.com/g2/world-history.json',
  })
  .transform({ type: 'sortX', by: 'y' })
  .transform({ type: 'sortColor', by: 'y', reducer: 'min' })
  .axis('x', false)
  .encode('x', 'civilization')
  .encode('y', ['start', 'end'])
  .encode('color', 'region')
  .scale('color', { palette: 'set2' })
  .label({ text: '' }) // 和这行代码有关系

chart.interaction('brushXFilter');

chart.render();

这个问题已经修复了

posted by pearmini over 1 year ago

Fund this Issue

$0.00
Funded

Pull requests