viking7982 commented on code in PR #18436:
URL: https://github.com/apache/echarts/pull/18436#discussion_r1159253516


##########
src/component/tooltip/TooltipHTMLContent.ts:
##########
@@ -241,23 +247,25 @@ function makeStyleCoord(out: number[], zr: ZRenderType, 
appendToBody: boolean, z
 
 interface TooltipContentOption {
     /**
-     * `false`: the DOM element will be inside the container. Default value.
-     * `true`: the DOM element will be appended to HTML body, which avoid
-     *  some overflow clip but intrude outside of the container.
+     * Choose a DOM element which the tooltip element will be located in order 
to
+     * avoid some overflow clip but intrude outside of the container.
+     *
+     * this config can be either a DomElement, a function to choose a element
+     * or a selector string used by query delector to local a element
      */
-    appendToBody: boolean
+    appendTo: ((el?: HTMLElement) => HTMLElement | undefined | null) | 
HTMLElement | string

Review Comment:
   Sure, I will do the rename.
   
   Let me explain the usage of that input with more detail. If there is a 
better way to do so, please tell me.
   
   In our project, we have a multi level dashboard(designed by user) and every 
dashboard can scroll insides like the picture below.
   
![image](https://user-images.githubusercontent.com/70554554/230266066-d5269fb1-ddff-44bd-a1fc-6c8446c568cf.png)
   
   Also, we want to manage all common tooltip config for different charts in a 
single config file. And I cannot use `myChart.getDom()` in that config file. So 
I need to have that element as an input such than I can use `e => 
e.closest('.scroll-container')` to locale my tooltip element correctly.
   
   



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

Reply via email to