echarts icon indicating copy to clipboard operation
echarts copied to clipboard

无法获得框选内容

Open xinshitn opened this issue 10 years ago • 7 comments

问题简述 (One-line summary)

在折线图下,使用'brushSelected'无法获得框选内容

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3
  • 浏览器类型和版本 (Browser version): chrome
  • 操作系统类型和版本 (OS Version): win10

重现步骤 (Steps to reproduce)

  1. 正常的'brushSelected'方法配置
  2. 在图表中使用框选,输出selected的array

期望结果 (Expected behaviour)

输出框选中的dataIndex集合

可能哪里有问题 (What went wrong)

用柱状图可以获取到,折线图就不行

ECharts配置项 (ECharts option)



其他信息 (Other comments)

xinshitn avatar Sep 06 '16 02:09 xinshitn

折线图暂时不支持 brush

pissang avatar Sep 06 '16 02:09 pissang

好吧

xinshitn avatar Sep 06 '16 02:09 xinshitn

@pissang, do you have plans for implementing the brush tool also for line charts?

Thank you for this awesome library.

emiola avatar Dec 15 '16 22:12 emiola

@emiola Yes it's in the plan :)

pissang avatar Dec 16 '16 01:12 pissang

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!

emiola avatar Dec 16 '16 04:12 emiola

@pissang 有可能在之后的版本brush支持折线图吗?使用折线图希望框选区域有没有其他解决方案呢?临时做个前端小案例,所以不是很熟悉,谢谢!~

ysjiang4869 avatar Dec 21 '16 06:12 ysjiang4869

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]

ysjiang4869 avatar Dec 22 '16 04:12 ysjiang4869