echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Feature] Can the box selection support series custom

Open nianlun opened this issue 1 year ago • 2 comments

What problem does this feature solve?

I drew some rectangles using series custom and need to perform box selection on them. Currently, the toolbox does not support box selection for series custom

What does the proposed API look like?

Hope the toolbox box supports series custom selection

nianlun avatar Dec 23 '24 12:12 nianlun

toolbox.dataZoom supports custom rectangles - official demo. 📌 please close issue if problem solved.

helgasoft avatar Dec 24 '24 02:12 helgasoft

@helgasoft What I need is to select some rectangles to obtain the selected rectangle data, rather than filtering. The example you provided is using Zoom to filter data.

nianlun avatar Dec 25 '24 09:12 nianlun

oops, you are right - brush selection does not work for custom series. Maybe custom data doesn't have dataIndex defined. Demo - custom and scatter brush selection comparison.

Idea: selection rectangle location is stored in batch[0].areas[0].range - 0:[x1,x2], 1:[y1,y2] pixels. If you know your rectangles vertices also in pixels, then it's easy to find which ones are inside the selection rectangle.

helgasoft avatar Dec 30 '24 06:12 helgasoft