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

Multiline series in Syncfusion charts for Xamarin Forms

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.


2 Replies

ME Manivannan Elangovan Syncfusion Team July 17, 2015 12:34 PM UTC

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



KA Kamal replied to Manivannan Elangovan December 15, 2017 04:28 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon