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/09/06 10:13:33 UTC

[GitHub] [echarts] DavidMarquezF opened a new issue, #17625: [Feature] tooltip.appendToBody with no scroll

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

   ### What problem does this feature solve?
   
   I'm using tooltip.appendToBody = true in order to be able to see all the tooltips properly. Everything works perfectly until I hover over a chart that's nearly outside of the screen.
   ![image](https://user-images.githubusercontent.com/32216320/188608113-d963f895-8a6d-4e29-ad89-f60bfc3c6798.png)
   
   As you can see it overflows the body and therefore creates s scrollbar in the html element. In this screen the charts are inside a container with inner scroll, so it kind of messes up the scroll because the user can scroll outside the view:
   ![image](https://user-images.githubusercontent.com/32216320/188608505-688e5c9f-8368-466b-94fd-79ab0a738340.png)
   
   Maybe it would be good to create the tooltip div inside of a relative layout that doesn't exceed the body size:
   
   ```html
   <body>
   .....
     <div style="position: relative; width: 100%; height: 100%; overflow: hidden">
            <div style="position:absolute">the tooltip as it is now</div>
     </div>
   </body>
   ```
   
   ### What does the proposed API look like?
   
   Add an option:
   
   ```ts
   {
      tooltip: {
          appendToBodyConfine: boolean
       }
   }
   ```
   
   which will add the overflow: hidden property to the tooltips parent container


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