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


##########
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:
   Since I'm not sure what arguments are useful for the callback, just take 
your idea.
   But the `el` can't explicitly show that it is the chart container and it's 
just a name that I use as the example, so let's rename it to `chartContainer`, 
or do you have any better name?



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