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

Lineseries doesn't appear correctly

Thread ID:





129520 Mar 23,2017 11:22 AM UTC Mar 30,2017 04:19 PM UTC Xamarin.Forms 6
Tags: SfChart
Asked On March 23, 2017 11:22 AM UTC

Hi, I made sfChart in this way:

KpiTwoChart = EmptyLinearChartBuilder(false, 0, from, to, "KpiTwoNoData");

 FastLineSeries kpiTwoSeries = LineSeriesBuilder(Color.Navy);
 kpiTwoSeries.ItemsSource = viewModel.KpiTwoData; //return a collection of data from REST service, Initially this collection is empty and it will be populated when datas                                                                                              arrive from server

implementation of   EmptyLinearChartBuilder
 public SfChart EmptyLinearChartBuilder(bool hasLegend, int TimePeriod, DateTime from, DateTime to, String isVisibileProperty)
            NumericalAxis secondaryAxis = new NumericalAxis
                RangePadding = NumericalPadding.Round,
                Maximum = 110,
                Minimum = -5,
                MajorTickStyle = new ChartAxisTickStyle
                    TickSize = 3
                EdgeLabelsDrawingMode = EdgeLabelsDrawingMode.Shift

            var chart = new SfChart
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                PrimaryAxis = new CategoryAxis
                    MaximumLabels = 3,
                    OpposedPosition = true,
                    LabelPlacement = LabelPlacement.BetweenTicks,
                   LabelStyle = new ChartAxisLabelStyle
                        LabelsPosition = AxisElementPosition.Inside
                    EdgeLabelsDrawingMode = EdgeLabelsDrawingMode.Shift,
                    MajorTickStyle = new ChartAxisTickStyle
                        TickSize = 0
                    ShowMajorGridLines = false

                SecondaryAxis = secondaryAxis

            if (hasLegend)
                chart.Legend = new ChartLegend();
                chart.Legend.DockPosition = LegendPlacement.Bottom;
                chart.Legend.IconHeight = 20;
                chart.Legend.IconWidth = 20;
                chart.Legend.IsVisible = true;

                chart.Legend.IsIconVisible = true;


            chart.SecondaryAxis.LabelCreated += SecondaryAxis_LabelCreated;

            if (!String.IsNullOrEmpty(isVisibileProperty))
                NumericalStripLine noData = new NumericalStripLine
                    Text = "No Data",
                    Start = -5,
                    Width = 110,
                    FillColor = Color.Transparent
                noData.SetBinding(NumericalStripLine.IsVisibleProperty, new Binding(isVisibileProperty));
                noData.BindingContext = viewModel;


            return chart;

What happen is this, when I load chars for first time it is correctly rendered but if I put application in background and open it again Line series disappear, and when i press button to reload data series appear agian, I couldn't understand wehere is the problem and why this happen, I also try to bind line series with source of data but nothing, The problem appear only on tablet on Android. I hope anyone could help me, thank you.

Parthiban Sundaram [Syncfusion]
Replied On March 24, 2017 06:55 PM UTC

Hi Amro,

Thanks for using Syncfusion products.

If the back button is pressed, the Android activity will be destroyed. Hence when you open it from the background apps, the application will start from initial point (same like closing and opening the application again).

Reference link: https://forums.xamarin.com/discussion/87092/back-button-closes-app-but-not-the-rest-of-the-application

But this should work when you put your application in background by pressing home button. If you are facing issue in this case too, we kindly request you to provide the device/OS details which will be helpful for providing further assistance on this.

Please let us know, if your issue is different from this.

Parthiban S

Replied On March 27, 2017 01:07 PM UTC

Dell venue 8 Android 5.1

Replied On March 28, 2017 06:47 AM UTC

Lines sometime doesn't appera also at first lounch of application

Saravana Pandian Murugan [Syncfusion]
Replied On March 28, 2017 05:01 PM UTC

Hi Amro,

Thanks for the update.

We kindly request you to confirm whether you put the application in background by pressing the home button. If so, please check whether you are able to reproduce the issue (while clicking home button and resume, application refreshes) in the attached sample.

Regarding "Lines sometime doesn't appear also at first launch of application",

We are unable to reproduce the reported issue at our end and we have prepared a sample as per your requirement. Please update us the modified sample to reproduce the issue which will be helpful for providing further assistance on this.

Sample : http://www.syncfusion.com/downloads/support/forum/129520/ze/ChartSample451750506

Saravana Pandian M.

Replied On March 29, 2017 07:02 AM UTC

I put the application in background by pressing home button, I'm not able to reproduce the issue in the attached sample, Thank you for helping me.

Saravana Pandian Murugan [Syncfusion]
Replied On March 30, 2017 04:19 PM UTC

Hi Amro,

Thanks for your update.

If you are still facing this issue in your application, could you please update us the modified sample with the issue you are facing which will be helpful to assist you further on this and provide you a solution..

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.

Please sign in to access our forum

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

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