graph expands the size of an angular-flex parent container
See original GitHub issueI’m submitting a … (check one with “x”)
[x ] bug report => search github for a similar issue or PR before submitting
Current behavior
a chart that has no [view]
set expands it’s parent container when using angular-flex
Expected behavior a chart should not change the size of the parent container, just fit inside it
Reproduction of the problem without the charts, the div card size size is “1654x872”
<div fxFlex #card>
<!-- <ngx-charts-bar-vertical .... </ngx-charts-bar-vertical> -->
</div>
If I add the charts back in, it gives a #card size of “1750x1024”
<div fxFlex #card>
<ngx-charts-bar-vertical .... </ngx-charts-bar-vertical>
</div>
What is the motivation / use case for changing the behavior? I have to employ a horrible hack to make the chart fit within the container
Please tell us about your environment: linux,
-
ngx-charts version: 5.3.1
-
Angular version: 4.2
-
Browser: Chrome Version 57.0.2987.98 (64-bit)
-
Language: [all]
Issue Analytics
- State:
- Created 6 years ago
- Reactions:8
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Flex-box sizing to children - css - Stack Overflow
I have an angular webpage using Angular Material and Flex-box. This page will have a graph that retains its ratio and therefore has...
Read more >A Complete Guide to Flexbox | CSS-Tricks
Our comprehensive guide to CSS flexbox layout. ... all the different possible properties for the parent element (the flex container) and the ...
Read more >Flexbox - Learn web development | MDN
Flexbox is a one-dimensional layout method for arranging items in rows or columns. Items flex (expand) to fill additional space or shrink to ......
Read more >How to make flexbox children 100% height of their parent ...
CSS Flexbox is an awesome tool to create website layouts. Making a flex-box child 100% height of their parent can be done in...
Read more >Angular flex layout basics
Angular flex static API contains a list HTML attributes that can be applied on layout containers and elements to build responsive HTML layouts....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Facing the same issue here, sad but true. Can’t use this library because of this 😦
Same as @Zundrium. Nice library but doesn’t work great with flexbox. Just ditched flexbox for every layout where a chart is used and now it works great. I also trigger a window resize event when major layout changes happen.