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.

Multiline series in Syncfusion charts for Xamarin Forms

Thread ID:

Created:

Updated:

Platform:

Replies:

119627 Jul 16,2015 01:24 AM Dec 14,2017 11:28 PM Xamarin.Forms 2
loading
Tags: SfChart
Sajid Ali
Asked On July 16, 2015 01:24 AM

Hi Syncfusion team!

We have the following scenario to complete. We have 30 days data, each day has 6 entities data we want to show on line series chart. How can we render multiple lines on single chart on Xamarin Forms.

Following image is what we want something like this:



Regards,

Sajid.


Manivannan Elangovan [Syncfusion]
Replied On July 17, 2015 08:34 AM

Hi Sajid,


Thanks for using Syncfusion products.


In Our SFChart we have support for render multiple series in single chart. Below code snippet shown how to add multiple series in single chart.


CodeSnippet:


SfChart chart = new SfChart ();


var line1 = new LineSeries()

{

ItemsSource = Data3, Label = "Published", Color = Color.Purple,

            DataMarker  = new ChartDataMarker(){ShowLabel = false, ShowMarker = true,

            MarkerHeight=5, MarkerWidth=5, MarkerColor = Color.Purple}

};


var line2 = new LineSeries()

{

            ItemsSource = Data2, Label = "Accepted", Color = Color.Purple,

            DataMarker  = new ChartDataMarker(){ShowLabel = false, ShowMarker = true,

            MarkerHeight=5, MarkerWidth=5, MarkerColor = Color.Purple}

};


var line3 = new LineSeries()

{

            ItemsSource = Data1, Label = "Active", Color = Color.Purple,

            DataMarker  = new ChartDataMarker(){ShowLabel = false, ShowMarker = true,

            MarkerHeight=5, MarkerWidth=5, MarkerColor = Color.Purple}

};

chart.Series.Add(line1);

chart.Series.Add(line2);

chart.Series.Add(line3);


 We have prepared a sample based on your requirement. Please download the sample from below location.


Sample: MultiLineSeries


Please let us know if you require further assistance on this.


Thanks
Manivannan.E


Kamal
Replied On December 14, 2017 11:28 PM

Hi Sajid,


Thanks for using Syncfusion products.


In Our SFChart we have support for render multiple series in single chart. Below code snippet shown how to add multiple series in single chart.


CodeSnippet:


SfChart chart = new SfChart ();


var line1 = new LineSeries()

{

ItemsSource = Data3, Label = "Published", Color = Color.Purple,

            DataMarker  = new ChartDataMarker(){ShowLabel = false, ShowMarker = true,

            MarkerHeight=5, MarkerWidth=5, MarkerColor = Color.Purple}

};


var line2 = new LineSeries()

{

            ItemsSource = Data2, Label = "Accepted", Color = Color.Purple,

            DataMarker  = new ChartDataMarker(){ShowLabel = false, ShowMarker = true,

            MarkerHeight=5, MarkerWidth=5, MarkerColor = Color.Purple}

};


var line3 = new LineSeries()

{

            ItemsSource = Data1, Label = "Active", Color = Color.Purple,

            DataMarker  = new ChartDataMarker(){ShowLabel = false, ShowMarker = true,

            MarkerHeight=5, MarkerWidth=5, MarkerColor = Color.Purple}

};

chart.Series.Add(line1);

chart.Series.Add(line2);

chart.Series.Add(line3);


 We have prepared a sample based on your requirement. Please download the sample from below location.


Sample: MultiLineSeries


Please let us know if you require further assistance on this.


Thanks
Manivannan.E


Hi Syncfusion team!,

I am applied this chart but when i am applied scroll view over this then got error=>
errro:Java.Lang.NoSuchMethodError: no static method with name='sendViewBatchUpdate' signature='(Landroid/view/View;FFIZFFFFFFF)V' in class Lcom/xamarin/forms/platform/android/FormsViewGroup;

i need chart scroll horizontally.
Regards,
Kamal

CONFIRMATION

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.

;