resize not resizing inner childs
When resizeing a widget, the resize of the window does not get called. This results in child components and libraries like NGX-charts to not resize until after the user resizes the screen. Is there something im missing, and if so, how should i fix this?
Hi @moepkid ,
Window resize is called only when you resize the window by the browser.
If you want to resize child components when the widget is resized you should listen to the itemResizeCallback.
Could anyone please point me to an example of this in action with ngx-charts? Thanks!
same need with ngx-charts
+1 , i'am facing same issue for Kendo charts as well as my normal html text. I have got it working here, but since my application is componentized, i'm not able to get the id of the sub div element
https://stackblitz.com/edit/tiberiuzuld-angular-gridster2-kdnkbt
Did anyone get anything on this?
There are 2 hacks to do this. tested with ngx-charts.
itemInitCallback: ((item: GridsterItem, itemComponent: GridsterItemComponentInterface) => { window.dispatchEvent(new Event('resize')); // to reisize respective charts })
2. inside your chart components reinitialize the datasrource eg.
// hack to resize graph
resize() {
this.results = [...this.results];
}