Chart will not show up if I did not set the chart's size

Hi all,
I am encountering a problem is that I want to make the Chart to adjust its size automatically depends on the screen size.
But if I did not set the chart's height, then the chart cannot show up (just blank).
On the contrary, the chart shows when I get it a height size(ex:100, 300, 500 can show up).

The official tutorial only say that the chart has to set its VerticalOptions and HorizontalOptions to 'FillAndExpand'.
https://www.syncfusion.com/kb/5722/how-to-add-the-chart-inside-stacklayout-scrollview?_ga=2.150690226.549192497.1607585422-169694129.1559643640

Is there any way to show the chart without setting its size?




Attachment: code_4e79ffec.zip

1 Reply

YP Yuvaraj Palanisamy Syncfusion Team December 11, 2020 03:19 PM UTC

Hi HannahC, 

Greetings from Syncfusion. 

We have analyzed your query and by default Xamarin.Forms SfChart control’s minimum height and width are zero. Hence, it appears blank. It is the only way to render the chart inside the StackLayout by setting its VerticalOptions and HorizontalOptions to 'FillAndExpand' . 
 
Regards, 
Yuvaraj. 


Loader.
Up arrow icon