antvis/G2

5.0版本,交互tooltip模式中的tooltip会越过图表边界,导致部分内容无法显示。 #4908

yoyo-sophia posted onGitHub

官网示例图片 .interaction('tooltip', {position: 'auto'}设置无效


如下测试代码没有问题呢?

/**
 * 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,
});

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%' });

chart.interaction('tooltip', { position: 'auto'})

chart.render();
posted by pearmini about 2 years ago

目前 5.0.4 的版本是没有问题的,所以就先关闭了。

posted by pearmini almost 2 years ago

Fund this Issue

$0.00
Funded

Pull requests