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.
Unfortunately, activation email could not send to your email. Please try again.

How to add the chart inside StackLayout/ScrollView

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

Article ID: Published Date: Last Revised Date: Platform: Control:
5722 11/18/2015 03/05/2018 Xamarin.Forms SfChart
Did you find this information helpful?
Comments
Jaison Jan 27, 2017
Hi,
By adding more charts with specific heights, how can we make it  scrollable?
Reply
Add Comment
You must log in to leave a comment

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.