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 2021/02/07 09:30:53 UTC

[GitHub] [echarts] madlee opened a new issue #14236: Render tooltip with user defined functions.

madlee opened a new issue #14236:
URL: https://github.com/apache/echarts/issues/14236


   ### What problem does this feature solve?
   I wish to show chemical structure / latex formula or some other complex content in a tooltip canvas. 
   I have the function (based on zrender) to draw these objects and I wish there is an API hooker to help me.
   An extra AJAX request may be required to fetch the more data during the render.
   
   ### What does the proposed API look like?
   ```
   tooltip: {
       size: [150, 50], // The tooltip size prepared for render
       onRender: function (
           data,       // The data of the selected point
           render,     // The echart/zrender object to draw on
           boundRect   // The bound rectangle to draw in
       ) {
           axios.get("/some.api?id="   data["id"]).then(function (response) {
               // Do some drawing code here.
           })
       }
   }
   ```
   
   <!-- 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.

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] plainheart commented on issue #14236: Render tooltip with user defined functions.

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


   Does [tooltip.formatter callback](https://echarts.apache.org/en/option.html#tooltip.formatter) work for you? 
   
   ![image](https://user-images.githubusercontent.com/26999792/107149841-eea89000-6995-11eb-93dc-86aa2224c281.png)
   


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

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] removed a comment on issue #14236: Render tooltip with user defined functions.

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] removed a comment on issue #14236:
URL: https://github.com/apache/echarts/issues/14236#issuecomment-774642173


   @madlee It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people, we'd like to suggest using English next time. 🤗<details><summary>TRANSLATED</summary>
   
   **BODY**
   
   ### What problem does this feature solve?
   I wish to show chemical structure / latex formula or some other complex content in a tooltip canvas. 
   I have the function (based on zrender) to draw these objects and I wish there is an API hooker to help me.
   An extra AJAX request may be required to fetch the more data during the render.
   
   ### What does the proposed API look like?
   ```
   tooltip: {
       size: [150, 50], // The tooltip size prepared for render
       onRender: function (
           data,       // The data of the selected point
           render,     // The echart/zrender object to draw on
           boundRect   // The bound rectangle to draw in
       ) {
           axios.get("/some.api?id="   data["id"]).then(function (response) {
               // Do some drawing code here.
           })
       }
   }
   ```</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.

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 #14236: Render tooltip with user defined functions.

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






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

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] madlee closed issue #14236: Render tooltip with user defined functions.

Posted by GitBox <gi...@apache.org>.
madlee closed issue #14236:
URL: https://github.com/apache/echarts/issues/14236


   


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

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] madlee commented on issue #14236: Render tooltip with user defined functions.

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


   > Does [tooltip.formatter callback](https://echarts.apache.org/en/option.html#tooltip.formatter) work for you?
   > 
   > ![image](https://user-images.githubusercontent.com/26999792/107149841-eea89000-6995-11eb-93dc-86aa2224c281.png)
   
   Yes. It works. Thank you.


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

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