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 2019/10/10 06:45:44 UTC

[GitHub] [incubator-echarts] dileepyelleti opened a new issue #11155: Chart is taking 0 width of its container div, when the parent element is initially hidden

dileepyelleti opened a new issue #11155: Chart is taking 0 width of its container div, when the parent element is initially hidden
URL: https://github.com/apache/incubator-echarts/issues/11155
 
 
   ### Version
   4.2.1
   
   ### Reproduction link
   [https://codepen.io/dileep_yelleti/pen/LYPzWxm](https://codepen.io/dileep_yelleti/pen/LYPzWxm)
   
   ### Steps to reproduce
   If there is chart inside an element with initial display as 'none' and then changed to display: 'block' then chart width will be set to 0. But if Initial parent display is 'block' then chart will take 100% of parent.
   
   In codepen sample click on showChart button which changes display property of chart parent from none to block. But chart wont be shown. Chart width was set to 0px. Even if we set chart element width as 100% it is plotting chart with 100px width
   
   ### What is expected?
   Chart should be plotted correctly irrespective of parent's initial display property. Also chart should be responsive by setting 100% width
   
   ### What is actually happening?
   Chart width was getting set to 0 if parent element is hidden. Even after changing parent display chart width remains same.
   
   <!-- 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


With regards,
Apache Git Services

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