We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
` 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) }) `
No response
先进行slider交互后在进行brushHighlight交互,监听brush:end事件,获得的data里的selection不正确。
🆕 5.x
The text was updated successfully, but these errors were encountered:
我的目标是获取到选中的图例,目前是这样解决的
Sorry, something went wrong.
No branches or pull requests
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 / 操作系统
Browser / 浏览器
The text was updated successfully, but these errors were encountered: