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. Image for the cookie policy date
close icon

SfChart doesn't show full height of chart in fragment


I am trying to display SfChart with column series inside the fragment. Somehow, the X-axis is not shown from its beginning.
I think it is due to the fact that I have ActionBar above the fragment. 
How can I display the full chart without having it cropped?

Here is the code I am using:

            chart = view.FindViewById<SfChart>(Resource.Id.barChartCategoryTypes);
            chart.Title.Text = "Cash flow by type";
            chart.Legend.Visibility = Visibility.Visible;
            chart.VerticalScrollBarEnabled = true;
            chart.HorizontalScrollBarEnabled = true;

            CategoryAxis primaryAxis = new CategoryAxis();
            primaryAxis.Title.Text = "Month";
            chart.PrimaryAxis = primaryAxis;

            //Initializing Secondary Axis
            NumericalAxis secondaryAxis = new NumericalAxis();
            secondaryAxis.Title.Text = "Amount";
            chart.SecondaryAxis = secondaryAxis;

            var dataModel = Statistics.Statistics.ColumnChartData(account);

            ColumnSeries areaSeries1 = new ColumnSeries()
                DataSource = dataModel[0],
                TooltipEnabled = true,
                AnimationEnabled = true,
                AnimationDuration = 0.2,
                Label = "Income",


            ColumnSeries areaSeries2 = new ColumnSeries()
                DataSource = dataModel[1],
                TooltipEnabled = true,
                AnimationEnabled = true,
                AnimationDuration = 0.2,
                Label = "Expenses",


DataModel is implemented as mentioned in your documentation.
This is the screenshot of the issue I am having.

Thanks in advance.

5 Replies

YP Yuvaraj Palanisamy Syncfusion Team July 19, 2016 12:42 PM UTC

Hi Stefan Mihajlovic,
Thanks for contacting Syncfusion Support
We have tested with both default ActionBar and Toolbar but we are not able to reproduce the reported issue. We have prepared a sample for your reference.  Please  update us the modified  sample for further assistance on this.

SM Stefan Mihajlovic July 20, 2016 09:58 PM UTC

Hi Yuvaraj,

I tried to fix the issue by looking into the sample and implementing part of its logic, but I was unsuccessful in that task. The issue still persists in my app.
Here is the code of my app that I am developing. Please run it and see if the issue is also present on your machine.
After successful build and deployment of the app, swipe from left corner to right to open Navigation Bar and go to Statistics sections.

Note: Reference to Syncfusion.SfChart.Android needs to be added first in order to build app successfully.

Thanks in advance,
Stefan Mihajlovic

Attachment: silvercoins_3dcb5cbf.zip

PS Parthiban Sundaram Syncfusion Team July 21, 2016 06:25 PM UTC

Hi Stefan,

As we have analyzed, we found that setting the “app:layout_scrollFlags="scroll|enterAlways” for Toolbar is the reason for the SfChart to crop below the actual area. We have also ensured this with default framework controls like Button, TextView etc. We have removed this property in toolbar and attached the sample. Please check and let us know if you need to set this property for some expected behavior in your application.

Sample : http://www.syncfusion.com/downloads/support/forum/125047/ze/SilverCoins2080192706  

Parthiban S 

SM Stefan Mihajlovic July 23, 2016 09:55 AM UTC

Hi Parthiban,

It works as expected now. Thanks again for quick replies.


YP Yuvaraj Palanisamy Syncfusion Team July 26, 2016 11:50 AM UTC

Hi Stefan,

Thanks for the update.


Live Chat Icon For mobile
Up arrow icon