Chart inside StackLayout

2 posts, 0 answers
  1. Murat
    Murat avatar
    4 posts
    Member since:
    Apr 2015

    Posted 17 Apr 2015 Link to this post


    I am working on a Xamarin Forms project.

    When I place a chart in page's content it is working(like in Telerik examples)

    But when I place it inside a StackLayout; chart does not populate in the view.

    Is it a bug?

  2. Deyan
    Deyan avatar
    2147 posts

    Posted 21 Apr 2015 Link to this post

    Hello Murat,

    This is the expected behavior.

    When you put an element inside a StackLayout it is positioned according to its own desired size. Since a Chart does not have its own desired size it will not be visible. You should explicitly define the size of the chart when put into a StackLayout or simply make sure the Chart is in a layout element that stretches it to the available size.


    See What's Next in App Development. Register for TelerikNEXT.

Back to Top