You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/05/10 14:51:58 UTC

[GitHub] nickelmatt opened a new issue #8320: Tooltip isn't visible when canvas is passed instead of div during init

nickelmatt opened a new issue #8320: Tooltip isn't visible when canvas is passed instead of div during init
URL: https://github.com/apache/incubator-echarts/issues/8320
 
 
   When "echarts.init" is called and given a canvas as the parameter instead of a div, the tooltip div is appended as a child of the canvas. This make it not work.
   
   
   
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 4.1.0.rc2 Full]:
   + Browser version [Google Chrome Version 66.0.3359.139 (Official Build) (64-bit)]:
   + OS Version [Ubuntu 16.04 LTS]:
   
   
   
   
   
   ### Expected behaviour [期望结果]
   When a canvas is passed, the parent element would most probably be a div. The tooltip should be appended to the parent element instead. I've included a patch that removes the tooltip from the canvas and append it to the parent element and it works.
   
   
   
   ### ECharts option [ECharts配置项]
   ```javascript
    options = {
           tooltip: {
               trigger: 'axis',
               position: function(point, params, dom, rect, size) {
                   dom.parentElement.removeChild(dom);
                   document.getElementById("chart").appendChild(dom);
               }
           },
   }
   
   ```
   
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org