无法获得框选内容
问题简述 (One-line summary)
在折线图下,使用'brushSelected'无法获得框选内容
版本及环境 (Version & Environment)
- ECharts 版本 (ECharts version): 3
- 浏览器类型和版本 (Browser version): chrome
- 操作系统类型和版本 (OS Version): win10
重现步骤 (Steps to reproduce)
- 正常的'brushSelected'方法配置
- 在图表中使用框选,输出selected的array
期望结果 (Expected behaviour)
输出框选中的dataIndex集合
可能哪里有问题 (What went wrong)
用柱状图可以获取到,折线图就不行
ECharts配置项 (ECharts option)
其他信息 (Other comments)
折线图暂时不支持 brush
好吧
@pissang, do you have plans for implementing the brush tool also for line charts?
Thank you for this awesome library.
@emiola Yes it's in the plan :)
Great! Any rough estimate time wise? I'm using a scatter plot for a large time series (~20000 points), but the brush selection looks a little slow (and also the data zoom apparently). I'm not sure if I'm using the best settings, though. I see that the line chart is optimized for handling large time series and so I'm expecting the brush selector being faster as well in this case. Thank you again!
@pissang 有可能在之后的版本brush支持折线图吗?使用折线图希望框选区域有没有其他解决方案呢?临时做个前端小案例,所以不是很熟悉,谢谢!~
I find you can listen to "bush" event,and get data index in params,such as
myChart.on('brush',renderBrushed);
renderBrushed: function (params) {
console.log(params);
console.log(params.areas[0].coordRange)
}
the coordrange is [minx,maxx]