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
1.拖拽滚动条前可以选择,并打印出选择的数据
2.拖动滚动条后,无法选择,并打印的数据是 null
3.以下是我的代码:
handleBuildChartBack = (container) => { const { data } = this.props; console.log(data); const chart = new Chart({ container: container, autoFit: true, title: '商品构成', }); this.chart = chart; chart.axis('x', { title: false, label: false }).axis('y', { title: '单量', titleFill: '#5dd3ca' }); chart .interval() .style('stroke', '#1296db') .style('strokeWidth', '0') .data(data) .encode('x', 'name') .encode('y', 'qty') // 滑块设置 .scrollbar('x', { ratio: 0.3 }) .scale('y', { nice: true }) // 视图层级的比例尺设置 .interaction('elementSelect', { single: true }) // .state('selected', { fill: 'orange' }) .state('unselected', { opacity: 0.5 }) // .state('single', true) .label([ { text: 'qty', fontSize: 12, dy: -15, }, { text: 'name', position: 'bottom', // fill: '#000', // 指定样式 dy: 0, formatter: (text, datum, index, data) => { return ''; }, }, ]); chart.on('element:select', (event) => { const { data, nativeEvent } = event; if (nativeEvent) { console.log(data); } }); chart.render(); return chart; };
The text was updated successfully, but these errors were encountered:
可能交互之间有冲突,我看看
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
【V 5.1.5】当条形图使用scrollbar时,当拖拽滑块后,无法选择柱状图, 请问如何解决?
1.拖拽滚动条前可以选择,并打印出选择的数据
2.拖动滚动条后,无法选择,并打印的数据是 null
3.以下是我的代码:
The text was updated successfully, but these errors were encountered: