You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/02/10 05:13:55 UTC

[GitHub] [echarts] plainheart commented on issue #16480: Need x,y,Width,Height of the chart elements

plainheart commented on issue #16480:
URL: https://github.com/apache/echarts/issues/16480#issuecomment-1034501496


   You may get such information via some internal APIs. Just FYI.
   
   **Grid**
   
   ```js
   // if there are multiple grids, use `getComponent('grid', gridIndex)`
   const gridRect = chart.getModel().getComponent('grid').coordinateSystem.getRect();
   ```
   
   **Axis**
   
   ```js
   // if there are multiple axes, use `getComponent('xAxis', axisIndex)`
   const xAxisModel = chart.getModel().getComponent('xAxis');
   const xAxisView = chart.getViewOfComponentModel(xAxisModel);
   const xAxisRect = xAxisView.group.getBoundingRect();
   ```


-- 
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