Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yoyo-sophia opened this issue Apr 24, 2023 · 2 comments
Assignees
Labels

Comments

@yoyo-sophia
Copy link

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

@pearmini pearmini self-assigned this Apr 24, 2023
@pearmini
Copy link
Member

pearmini commented Apr 24, 2023

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

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

@pearmini pearmini removed the Bug label Apr 24, 2023
@pearmini
Copy link
Member

pearmini commented May 4, 2023

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

@pearmini pearmini closed this as completed May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants