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

antv V5.2.2 堆叠条形图 如何设置才能让鼠标在画布上移动时对应位置的分类出现背景框 #6578

Open
cheared opened this issue Jan 7, 2025 · 0 comments

Comments

@cheared
Copy link

cheared commented Jan 7, 2025

问题描述

在G2 V5.2.2版本下使用以下代码无效
const chart = new Chart({
container: 'container',
autoFit: true,
});

chart
.interval()
.data(data)
.encode('x', '月份')
.encode('y', '月均降雨量')
.encode('color', 'name')
.transform({ type: 'stackY' })
.interaction('elementHighlight', { background: true });

chart.interaction('tooltip', {
shared: true,
showMarkers: false,
});

// interaction方法似乎不支持active-region
chart.interaction('active-region')

chart.render();

重现链接

No response

重现步骤

No response

预期行为

鼠标在画布上移动时对应位置的分类出现背景框,并且点击背景可以提供回调方便添加其他操作
1956834e4750061a784809b60df4d89e

平台

  • 操作系统: [Windows]
  • 网页浏览器: [Google Chrome]

屏幕截图或视频(可选)

1956834e4750061a784809b60df4d89e

补充说明(可选)

No response

@cheared cheared changed the title antv V5.2.2 堆叠条形图 鼠标在画布上移动时对应位置的分类出现背景框 antv V5.2.2 堆叠条形图 如何设置才能让鼠标在画布上移动时对应位置的分类出现背景框 Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant