Hi
This is a feature of the chart
component. Initially, the component has a width of 100%
. When the visibility area is expanded, the components expand in accordance with the increase in the size of the container in which they are located.
When the area is collapsed, the size is not recalculated, since the container cannot forcibly shrink the chart
components nested in it.
As a workaround, you can use flex-grow
instead of 100% width for the containers:
<hbox width="100%">
<vbox classNames="flex-grow">
<charts:chart id="chart" width="100%" visible="true">
<charts:dataSet>
<charts:source dataContainer="vehiclesDc"
categoryField="year"
valueFields="cars motorcycles bicycles"/>
</charts:dataSet>
<charts:series>
<charts:bar name="Cars"/>
<charts:bar name="Motorcycles" stack="stack"/>
<charts:bar name="Bicycles" stack="stack"/>
</charts:series>
<charts:xAxes>
<charts:xAxis/>
</charts:xAxes>
<charts:yAxes>
<charts:yAxis>
<charts:axisLabel formatter="{value}"/>
</charts:yAxis>
</charts:yAxes>
</charts:chart>
</vbox>
<vbox id="pieBox" classNames="flex-grow" visible="true">
<charts:chart id="pie" width="100%" height="80%" minHeight="30em"
alignSelf="STRETCH" visible="true">
<charts:series>
<charts:pie name="Onboarding Status" radius="50% 80%">
<charts:label formatter="{b} : {d}%"/>
</charts:pie>
</charts:series>
</charts:chart>
</vbox>
<vbox id="tableBox" width="100%" visible="false">
<dataGrid dataContainer="vehiclesDc" width="100%">
<columns>
<column property="year"/>
<column property="cars"/>
<column property="motorcycles"/>
<column property="bicycles"/>
</columns>
</dataGrid>
</vbox>
<vbox classNames="flex-grow">
<charts:chart id="funnel" width="100%"
height="100%" visible="true">
<charts:legend/>
<charts:series>
<charts:funnel/>
</charts:series>
</charts:chart>
</vbox>
</hbox>
</layout>