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.

How to customize serie color

Thread ID:





131697 Jul 24,2017 03:27 AM Jul 25,2017 06:52 AM Xamarin.Forms 2
Tags: SfDateTimeRangeNavigator
David Perera
Asked On July 24, 2017 03:27 AM

Hi, I have a SfChart with customized color series.

I have a SfDateTimeRangeNavigator and I want to use the same color. In the SfChart I can change the colors, but in the SfDateTimeRangeNavigator I do not see the option.

Thank you.

David Perera
Replied On July 24, 2017 03:31 AM

This is my code for the assigning the  Data (I can only do it in that way):

SfDateTimeRangeNavigator rangeNavigator = new SfDateTimeRangeNavigator();

rangeNavigator.SetBinding(SfDateTimeRangeNavigator.ItemsSourceProperty, "Line0ExtendedData");

rangeNavigator.XBindingPath = "XValue";

rangeNavigator.YBindingPath = "YValue";

Saravana Pandian Murugan [Syncfusion]
Replied On July 25, 2017 06:52 AM

Hi David, 
Thanks for using Syncfusion products. 
You can customize the colors of ChartSeries which you set as the Content of DateTimeRangeNavigator. Please find the code snippet below. 
Code Example: 
LineSeries lineSeries = new LineSeries(); 
lineSeries.Color = Color.Red;                     
lineSeries.SetBinding(ChartSeries.ItemsSourceProperty, "DateTimeRangeData"); 
lineSeries.XBindingPath = "XValue"; 
lineSeries.YBindingPath = "YValue"; 
rangeNavigator.Content = contentChart; 
We have attached sample for your reference which can be downloaded from the below location. 
Please check the attached sample and let us know if you need further assistance on this. 
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.