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/06/30 09:00:21 UTC

[GitHub] [echarts] 1836661896 opened a new issue, #17299: [Bug] 使用extendShape自定义组件时获取不到坐标

1836661896 opened a new issue, #17299:
URL: https://github.com/apache/echarts/issues/17299

   ### Version
   
   5.3.3
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   创建extendShape 自定义样式
   构建echart图表
   使用series  custom 自定义
   再renderItem中传入shape:{
                         x: api.value(0),
                         y: api.value(1),
                         width: api.value(3),
                         height: api.value(4)
                     },
   按照文档上的内容,该传参为坐标的x和y轴及宽高,但是获取到的0和1为data中的值,2和3为NaN
   
   ### Current Behavior
   
   根据网上搜索的结果,api中原应有一个方法 为 coord 可以根据值计算x和y的坐标,目前最新版无此方法,希望能重新引入
   
   ### Expected Behavior
   
   根据网上搜索的结果,api中原应有一个方法 为 coord 可以根据值计算x和y的坐标,目前最新版无此方法,希望能重新引入
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   
   ### Any additional comments?
   
   _No response_


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


[GitHub] [echarts] WangWuzhen626 commented on issue #17299: [Bug] 使用extendShape自定义组件时获取不到坐标

Posted by GitBox <gi...@apache.org>.
WangWuzhen626 commented on issue #17299:
URL: https://github.com/apache/echarts/issues/17299#issuecomment-1255742910

   I also has the same question! 
   when I set the data as interface `Hex[]`,it does work useing `api.value(0)`. As I console it ,it shows `NaN`. By the way,hex is a class I  defined.
   


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


[GitHub] [echarts] echarts-bot[bot] commented on issue #17299: [Bug] 使用extendShape自定义组件时获取不到坐标

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17299:
URL: https://github.com/apache/echarts/issues/17299#issuecomment-1172000626

   @1836661896 Please provide a demo for the issue either with [Official Editor](https://echarts.apache.org/examples/editor.html), [CodePen](https://codepen.io/Ovilia/pen/dyYWXWM), [CodeSandbox](https://codesandbox.io/s/echarts-basic-example-template-mpfz1s) or [JSFiddle](https://jsfiddle.net/plainheart/e46ozpqj/7/).


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


[GitHub] [echarts] echarts-bot[bot] commented on issue #17299: [Bug] 使用extendShape自定义组件时获取不到坐标

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17299:
URL: https://github.com/apache/echarts/issues/17299#issuecomment-1170956504

   @1836661896 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] Can't get coordinates when using extendShape custom component
   
   **BODY**
   
   ### Version
   
   5.3.3
   
   ### Link to Minimal Reproduction
   
   _No response_
   
   ### Steps to Reproduce
   
   Create an extendShape custom style
   Build an echart chart
   Customize with series custom
   RenderItem in the incoming shape:{
                         x: api.value(0),
                         y: api.value(1),
                         width: api.value(3),
                         height: api.value(4)
                     },
   According to the content on the document, the parameter is the x and y axes of the coordinates and the width and height, but the obtained 0 and 1 are the values in the data, and 2 and 3 are NaN
   
   ### Current Behavior
   
   According to the results of the online search, api originally should have a method for coord to calculate the coordinates of x and y based on the value, the latest version does not have this method, hoping to be reintroduced
   
   ### Expected Behavior
   
   According to the results of the online search, api originally should have a method for coord to calculate the coordinates of x and y based on the value, the latest version does not have this method, hoping to be reintroduced
   
   ### Environment
   
   ```markdown
   - OS:
   - Browser:
   - Framework:
   ```
   
   ### Any additional comments?
   
   _No response_
   </details>


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