antvis/G2

Do you want to work on this issue?

You can request for a bounty in order to promote it!

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

cheared posted onGitHub

问题描述

在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


Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests