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

在 "@antv/g2": "~4.2.10" 版本使用 Chart 时,请问如何取消 legend 的默认点击行为,即不想点击图例后,对应的折线消失,图例只用作显示 #6084

Closed
SnowBeforeSpring opened this issue Feb 5, 2024 · 1 comment

Comments

@SnowBeforeSpring
Copy link

问题描述

import { Chart } from '@antv/g2'

const res = new Chart({
container: antVLineContainer.current as HTMLElement,
autoFit: true,
})

chart.legend({
position: 'top',
marker: { symbol: 'hyphen' },
// 这里看类型定义里面没有禁止点击事件的方法 or 属性
})

重现链接

No response

重现步骤

No response

预期行为

No response

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@pearmini
Copy link
Member

可以看看文档,关闭对应的 interaction。

@antvis antvis locked and limited conversation to collaborators Jun 11, 2024
@pearmini pearmini converted this issue into discussion #6281 Jun 11, 2024

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

2 participants