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.

requestLayout() improperly called by com.syncfusion.charts.ChartRootLayout

Thread ID:





124631 Jun 20,2016 02:33 AM Jun 21,2016 01:36 AM Xamarin.Forms 2
Tags: SfChart
Asked On June 20, 2016 02:33 AM


Im just starting out with forms, created a simple forms plc project

(VisualStudio 2015)
I have added nuget reference to http://nuget.syncfusion.com/xamarin

Then throught nuget manager added the reference: Syncfusion.xamarn.sfchart

The I made a simple page to test the charts, code below

But nothing is appearing, im getting an error:
06-20 13:29:30.532 W/View    ( 4391): requestLayout() improperly called by com.syncfusion.charts.ChartRootLayout{acfb4af8 V.E..... ......ID 20,20-1815,1130 #7f0b0064 app:id/rootLayout} during layout: running second layout pass

Could someone help me figure this out.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"

      <xForms:ColumnSeries ItemsSource = "{Binding HighTemperature}"/>

public partial class Page1 : ContentPage
        public ObservableCollection<ChartDataPoint> HighTemperature { get; set; }
        public Page1()
            HighTemperature = new ObservableCollection<ChartDataPoint>();
            HighTemperature.Add(new ChartDataPoint("Jan", 42));
            HighTemperature.Add(new ChartDataPoint("Feb", 44));
            HighTemperature.Add(new ChartDataPoint("Mar", 53));
            HighTemperature.Add(new ChartDataPoint("Apr", 64));
            HighTemperature.Add(new ChartDataPoint("May", 75));
            HighTemperature.Add(new ChartDataPoint("Jun", 83));
            HighTemperature.Add(new ChartDataPoint("Jul", 87));
            HighTemperature.Add(new ChartDataPoint("Aug", 84));
            HighTemperature.Add(new ChartDataPoint("Sep", 78));
            HighTemperature.Add(new ChartDataPoint("Oct", 67));
            HighTemperature.Add(new ChartDataPoint("Nov", 55));
            HighTemperature.Add(new ChartDataPoint("Dec", 45));



Replied On June 20, 2016 03:16 AM

After reading some forums threads, I fugured this out, my defenition didn't have all the necessary properties

changed the def to this, and it worked

<chart:SfChart x:Name="Chart" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">





          <chart:ChartTitle Text="Student Score"/>





              <chart:ChartAxisTitle Text="Name"/>







              <chart:ChartAxisTitle Text="Score"/>





          <chart:BarSeries  Label = "High" ItemsSource = "{Binding Students}" XBindingPath="Name"
              EnableAnimation = "true"



Saravana Pandian Murugan [Syncfusion]
Replied On June 21, 2016 01:36 AM

Hi Michal,

Thanks for update. We are glad that your issue is resolved. Please let us know if you need any further assistance.

Saravana Pandian M.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.