You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "liuwo23 (via GitHub)" <gi...@apache.org> on 2023/10/10 02:59:26 UTC
[I] 'echartsInstance' exposue API 'getRegionByCoord' [echarts]
liuwo23 opened a new issue, #19184:
URL: https://github.com/apache/echarts/issues/19184
### What problem does this feature solve?
In development, there is often a need to obtain Region information based on screen coordinates. However, the echartsInstance API does not directly expose the getRegionByCoord function. It is necessary to access this function by obtaining the coordinateSystem: Geo. Why not directly add this functionality to the echartsInstance API? Moreover, functions like convertFromPixel and convertToPixel from the Geo class have already been exposed in the echartsInstance, making it straightforward to implement getRegionByCoord.
### What does the proposed API look like?
we can get region by screen coord, directly add the method `getRegionByCoord` from the `Geo` class to `echartsInstance`.
the current implementation:
`
const coordinateSystem = echartsInstance.getModel().getSeriesByIndex(0).coordinateSystem;
const coords = echartsInstance.convertFromPixel({geoIndex: 0,},[x,y]);
const region = coordinateSystem.getRegionByCoord(coords)
`
the desired implementation:
`const region = echartsInstance .getRegionByCoord({finder,coords})`
--
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: commits-unsubscribe@echarts.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] 'echartsInstance' exposue API 'getRegionByCoord' [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19184:
URL: https://github.com/apache/echarts/issues/19184#issuecomment-3417212917
This issue has been automatically closed because it did not have recent activity. If this remains to be a problem with the latest version of Apache ECharts, please open a new issue and link this to it. Thanks!
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] 'echartsInstance' exposue API 'getRegionByCoord' [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #19184:
URL: https://github.com/apache/echarts/issues/19184#issuecomment-3387486115
This issue has been automatically marked as stale because it did not have recent activity. It will be closed in 7 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this issue.
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org
Re: [I] 'echartsInstance' exposue API 'getRegionByCoord' [echarts]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #19184: 'echartsInstance' exposue API 'getRegionByCoord'
URL: https://github.com/apache/echarts/issues/19184
--
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: commits-unsubscribe@echarts.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org