Do you want to work on this issue?
You can request for a bounty in order to promote it!
[Bug]: 在slider交互后,进行brushHighlight交互,获取到的selection为未进行slider交互前的selection #6604
FangYuru posted onGitHub
Describe the bug / 问题描述
` import { Chart } from '@antv/g2';
const chart = new Chart({ container: 'container', height: 640, });
chart .cell() .data({ type: 'fetch', value: 'https://gw.alipayobjects.com/os/bmw-prod/bd287f2c-3e2b-4d0a-8428-6a85211dce33.json', }) .scale('color', { type: 'ordinal' }) .encode('x', 'x') .encode('y', 'y') .encode('color', 'index') .style('stroke', '#000') .style('inset', 2) .animate('enter', { type: 'fadeIn' }) .slider('y') .slider('x') .interaction('brushHighlight', true)
chart.render();
chart.on('brush:end', (event) => { const [colList, rowList] = event.data.selection console.log(colList, rowList, event.data.selection, event) }) `
Reproduction link / 复现链接
No response
Steps to Reproduce the Bug or Issue / 重现步骤
先进行slider交互后在进行brushHighlight交互,监听brush:end事件,获得的data里的selection不正确。
Version / 版本
🆕 5.x
OS / 操作系统
- macOS
- Windows
- Linux
- Others / 其他
Browser / 浏览器
- Chrome
- Edge
- Firefox
- Safari (Limited support / 有限支持)
- IE (Nonsupport / 不支持)
- Others / 其他