You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "caneserr (via GitHub)" <gi...@apache.org> on 2024/02/20 05:54:05 UTC

[I] [Bug] Chart doesnt resize itselft to full container width [echarts]

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

   ### Version
   
   5.4.3
   
   ### Link to Minimal Reproduction
   
   https://ix.siemens.io/docs/controls/charts/
   
   ### Steps to Reproduce
   
   1) set width of the container html element to 100% and height to some fixed value.
   2) see chart get width of 100px instead of %100 of the container
   
   ### Current Behavior
   
   I give a chart contaoner width %100 width but chart getting resized to 100px. if  I give %99 chart resizes to 99px
   
   ### Expected Behavior
   
   I expect chart to resize itself to full container width
   
   ### Environment
   
   ```markdown
   - OS: windows 11
   - Browser: chrome 121.0.6167.185 
   - Framework: react 18.2.0
   ```
   
   
   ### Any additional comments?
   
   _No response_


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


Re: [I] [Bug] Chart doesnt resize itselft to full container width [echarts]

Posted by "spearmootz (via GitHub)" <gi...@apache.org>.
spearmootz commented on issue #19624:
URL: https://github.com/apache/echarts/issues/19624#issuecomment-2435972189

   this happens to me too.  the instance.getWidth() reports the correct number,  the canvas or svg are the size of the container. the graph inside only takes up like 20% of the width though


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

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


Re: [I] [Bug] Chart doesnt resize itselft to full container width [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #19624:
URL: https://github.com/apache/echarts/issues/19624#issuecomment-1954872143

   The referenced [official example](https://echarts.apache.org/examples/en/editor.html?code=PYBwLglsB2AEC8sDeAoWszGAG0iAXMmuhgE4QDmFApqYQOQCGAHhAM70A0x6L7ACsAjQwtQqhIkwATxDUGbABaMAJsADu9HrAC-xHd3TZqNaCvEHiFcuaKTjAMzAMAzAFIu28hUXPY9ABYPQxIAI2AwTABbV2DtAGMYMEZhABlGUOpsQjBSAFdqfRDmAEFWNkIAbW0JSQxZeX94xlEKYFJpTzrYFRbGKvoAWRgufwAVAtH6AHVqFSmxxTypgDFyKYBlFs286HoAXW09dH2Q6TL2KprtdBk5BgA3RmxJo-JT4jZaCGoK2GrJLVJNBGFFGvQACIQUjUeJgLp1O7g0KMUgIyTUKIgZRsS52bqwBzAeJ5P70L7kX5abqWbq9ZJVFwAJgADJxYC5meyXCyAIzclwBbkATjZHJ53NZh0ktJIQJIILBDAAolEUth0VIGgwUWiQpI2Ml4gBrBgleb6kiY7GMXF_eWSIkkskUn4cG66S3oen9f681ns3lc2C8vmBwXs0XspkS2BM0PSkiy9AO2CK8EAVWgUDg5o4Xvq938us16ENjBNZotHutOLxqfQTtJCm-VI9yZIPqqTIDIYAHEzA8L-XGI3Go-KxS4E0dLan0wwAGoQFTUYCwPOlwvI1Fb8uV_zmre1231j2N4nN_yuts0gtdv0AVjFMcHcbDIcfQpDE85YoCM4ynOHoLv4GzUKi8SKLAyrQBQwjUFuSI6ru959FUfYAGxvqGvJ9pGmHfqGTKYYGmEAOzCmRLJiryj7kSyHzdCedriOehKXi6rbuneHpqqQxqpAhbEErA2AIRsMjGCJonbgwvRKHM1IEh2kgPpUlRIHJ_hRMI9Cesg2n0GqzD6To-yJjKs7XN0oH0AAQikKjLAWyHFqhHq6tMK5gIohCPg
 W-6mmBEGkFBMFwQhx5YnW9rsU2XGUjxdSqT06H_NhYrkcGDEjtlREshOvJBrR_qMdZgIgaC4IAOJYBQxhIdq7l6h6QUMOBkHQbB8HQIhBYsWeokJS2SXKUBHrqWV4Y4R-QbfkyE4xi-UoVXKVVKv49nCBQTVFvQJaBUawX0J1YXdZFfXRTarH4t0I3Xtx41JmhDIZVlb7kXlRFFbGxXlRNlW2dVDAAPK-bQ-Yem5B0ed07UhV1EW9f1NYxaecXDZxo1us96Cpep2HsgOkYjn2BVUSGoaBqtVknCE1iMNiEDxDJ6BZJi1AiH8AJ1A2RmiMw8IFkY1BOAw8Rc6IrWiZgBBNFLtCjAAXvgxUi7AhrSNJd0EoLfj0DCuLK9QaYaAAdJbW6OkkGwQCbhBMvh7EXiIsyUL4Oo4NWsmEhA2DZMWLyo6JqW6NoiZ6DoADcKDqMIajqObqgqMqDxS0Jhpc7QAAUhu_Pb_WwDnACUCAAHz4uoxum4gUTSAAwsopBgObNBgN5Ki-aXsfoKAkAwG3pBM4oLPmxzYLc5UjHm1rxjm_rCD-PHXeKPA9AANTV4XvewPXTeoq3XxgKD4A5jn_c5iXsc6CXQA) works fine with _width:'100%'_.
   So it must be something specific to your environment configuration.


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

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


Re: [I] [Bug] Chart doesnt resize itselft to full container width [echarts]

Posted by "caneserr (via GitHub)" <gi...@apache.org>.
caneserr closed issue #19624: [Bug] Chart doesnt resize itselft to full container width
URL: https://github.com/apache/echarts/issues/19624


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

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


Re: [I] [Bug] Chart doesnt resize itselft to full container width [echarts]

Posted by "chdenat (via GitHub)" <gi...@apache.org>.
chdenat commented on issue #19624:
URL: https://github.com/apache/echarts/issues/19624#issuecomment-2341922273

   I got the same. I think that it is a bug.
   But if you use react states you can have the expected behavior.
   Set the react width and height to 2 states.
   In a window resize event, set these states to the chart container width and height values.
   So each time the window will be resizes, the chart is resized to its 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

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