richex-cn opened a new issue #15779: URL: https://github.com/apache/echarts/issues/15779
### What problem does this feature solve? When I use geo map to get the rectangle coordinate information of the selected area, it is very difficult. I have searched in the document for a long time and it seems that no such API is provided. I hope that when I select a map area, I can get the rectangle coordinates and size information of this area, so that I can do something outside of echarts, such as showing some animations on it, or popping up some more complicated prompts, etc. I write a simple example, I know this is a bad method: <https://codesandbox.io/s/echarts-get-geo-rect-85lvu> Does the request consider providing this API or is there a way to implement it? ### What does the proposed API look like? ```javascript chart.on('selectchanged', data => { if (data.selected.length) { data.selected.forEach(({ seriesIndex, dataIndex }) => { const rectInfo = chart.getGeoRectInfo({ seriesIndex: seriesIndex, dataIndex: dataIndex // maybe support Number or Array<Number> }) console.log(rectInfo) }) } }) ``` <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE --> <!-- This issue is in English. DO NOT REMOVE --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
