Dynamic chart resizing.


Could you please help me with chart resizing?
If page initially displays a chart, it (svg tag) has some default fixed size (600x400px) wrapped by bigger tags and resizes only on resize window or some repaint action in browser. How to achieve to fill empty space after page load?
We use vaadin 14.1.2.
Thanks in advance.

Have you tried wrapping the Chart in Div like this?

public static Div getPieChart(String year){
	Div div = new Div();
	Chart chart = new Chart(ChartType.PIE);

	return div;

Thanks for replay.
Yes. There is another problem. My chart is placed in Detail which is by default not openned and chart then sets some default size. If Detail is openned chart is correctly displayed in fullsize. Have you some hint for this setup “Chart in not openned Detail”?