Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

interval图,如何隐藏 tooltip #5003

Closed
wanglihuaya opened this issue May 11, 2023 · 0 comments
Closed

interval图,如何隐藏 tooltip #5003

wanglihuaya opened this issue May 11, 2023 · 0 comments

Comments

@wanglihuaya
Copy link

interval图,如何隐藏 tooltip

chart.interaction('tooltip', {
body:false,
});

复现代码

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',
  })
  .transform([{ type: 'sortX', by: 'y', reverse: true, slice: 5 }])
  .encode('x', 'letter')
  .encode('y', 'frequency')
  .axis('y', { labelFormatter: '.0%' });

  chart.interaction('tooltip', {
  body:false,
  crosshairs:false,
});

chart.render();

没有效果

@antvis antvis locked and limited conversation to collaborators May 11, 2023
@hustcc hustcc converted this issue into discussion #5004 May 11, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant