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

How to customize serie color

Thread ID:

Created:

Updated:

Platform:

Replies:

131697 Jul 24,2017 07:27 AM UTC Jul 25,2017 10:52 AM UTC Xamarin.Forms 2
loading
Tags: SfDateTimeRangeNavigator
David Perera
Asked On July 24, 2017 07:27 AM UTC

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 07:31 AM UTC

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 10:52 AM UTC

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"; 
  
contentChart.Series.Add(lineSeries); 
  
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. 
  
Regards, 
Saravana Pandian M. 


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.

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

;