Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#7292·G2

[Bug]: 触发单个元素的高亮时,高亮未生效

Author: xiaoke-1Created Apr 17, 2026Updated Apr 17, 2026
Labelswaiting for maintainer

Describe the bug / 问题描述

官网的柱状图实例,开启高亮交互,然后添加如下触发的逻辑,高亮没有生效, 如果同时高亮多个元素是正常的

setTimeout(()=>{
  chart.emit('brush:highlight',{data:{selection:[['H'],[0,2000]]}})
},1000)

Reproduction link / 复现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

官网的柱状图增加一个触发事件就可复现 Image

Version / 版本

5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

Source: antvis/G2

View original on GitHubView discussion on GitHub