We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add the chart inside StackLayout/ScrollView

Platform: Xamarin.Forms |
Control: SfChart |
Published Date: November 18, 2015 |
Last Revised Date: March 5, 2018

When you add SfChart as a child of StackLayout/ScrollView, you will see a blank screen with no chart rendered. This happens because StackLayout/ScrollView control measures its children with the respective control’s minimum height for vertical orientation and minimum width for horizontal orientation. Since the chart control’s minimum height and width are zero, it appears blank. Hence, in order to avoid this, set the VerticalOptions/HorizontalOptions property of the SfChart to FillAndExpand to plot the chart in the available (remaining) space.

C#

 

XAML

 

Screenshot:

C:\Users\yuvaraj.palanisamy\Pictures\android.png

2X faster development

The ultimate Xamarin UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment
Comments
Jaison
Jan 27, 2017
Hi,
By adding more charts with specific heights, how can we make it  scrollable?
Reply

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon