Google Charts via Ajax ('minimum size' bug in Chrome, Opera and Safari)
I'm using Angular Material with Google Charts. The data for the charts is loaded dynamically, so they don't show up until data arrives (then draw() functions are called). The Charts are arranged vertically, as a column, a few charts. Furthermore, all of them are charts with controls, that is - dashboards. It was alright for a while. Everything was ok, except that the latest versions of Chrome horribly screwed things -- now all the charts are squished. Vertical spacing does not seem to work with them, after the charts are loaded. All the charts, the controls, and some inputs are sitting on top of each other
Opera was ok for a little bit, except that the latest version also does the same now. That's probably because they both use Blink. Firefox is kind of ok, some non-crucial spacing is missing (space-around), but it does not do that "squishing". Controversially, the only browser that shows it the best right now is IE
Unfortunately, the graphs show commercial data from a database and are accessed via a login, so I cannot show them. Could possibly show some code, but not sure exactly what
Anybody has any ideas?
I know that with chrome specifically there's an issue with the flex-shrink css attribute such that if there is not enough room in a flexbox then the box will shrink to accommodate the available space, to the point that the content will sometimes bleed out of the boxes. One way I've found to fix this in chrome is to set flex-shrink to 0 on all elements, so maybe putting this into your css will help:
* {
flex-shrink: 0 !important;
}
There is some information in this article under the 'Minimum size bugs' section: http://philipwalton.com/articles/normalizing-cross-browser-flexbox-bugs/
There was also a ticket I read about in the chromium tracker about flex, but I can't find it offhand.
Thanks, awesome this has worked! Quite confusing was that this behaviour only started happening with very fresh versions of Chrome / Opera