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.

Scroll to Next Range

Thread ID:

Created:

Updated:

Platform:

Replies:

126007 Sep 17,2016 02:18 AM Sep 21,2016 12:35 PM Xamarin.Android 5
loading
Tags: SfDateTimeRangeNavigator
Albert K
Asked On September 17, 2016 02:18 AM

Hi,
How do I give the user the option to load the next day or previous day chart from a "range navigation" that is showing currently the previous day's data? Thank you.
SfDateTimeRangeNavigator rangeNavigator = new SfDateTimeRangeNavigator(this);
rangeNavigator.SetBackgroundColor(Color.White);
rangeNavigator.TooltipFormat = "HH:mm aa";
rangeNavigator.LayoutParameters = new ViewGroup.LayoutParams(1280, 230);
rangeNavigator.Minimum = new GregorianCalendar(2016, 8, 16, 4, 0).Time;
rangeNavigator.Maximum = new GregorianCalendar(2016, 8, 15, 4, 0).Time;
rangeNavigator.ScrollChange += RangeNavigator_ScrollChange;
rangeNavigator.RangeChanged += RangeNavigator_RangeChanged;
rangeNavigator.LongClick += RangeNavigator_LongClick;
(rangeNavigator.Content as SfChart).Series.Add(new SplineSeries() { DataSource = data });

Yuvaraj Palanisamy [Syncfusion]
Replied On September 19, 2016 09:43 AM

Hi Albert K, 
 
Thanks for contacting Syncfusion support. 
 
Please refer the following code snippet to view the chart area with expected range using RangeChanged event of SfDateTimeRangeNavigator. Also we have prepared a sample for your reference. Please find the sample from the below location. 
 
Code Snippet:                                       
    
C#:   
SfDateTimeRangeNavigator rangeNavigator = new SfDateTimeRangeNavigator(this);    
 
rangeNavigator.RangeChanged += RangeNavigator_RangeChanged; 
 
private void RangeNavigator_RangeChanged(object sender, SfDateTimeRangeNavigator.RangeChangedEventArgs e) 
{ 
       (chart.PrimaryAxis as DateTimeAxis).Minimum = e.P0; 
       (chart.PrimaryAxis as DateTimeAxis).Maximum = e.P1; 
} 
      
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
Please let us know if you have any further queries regarding this.   
 
Regards, 
Yuvaraj 
  
  
  


Albert K
Replied On September 19, 2016 08:38 PM

Hi,

Thank you for the sample.  What i want is for the range navigator (SfDateTimeRangeNavigator) to show just one day, then have the ability to move to the previous or next day.  Is that possible?  Thank you.

Yuvaraj Palanisamy [Syncfusion]
Replied On September 20, 2016 10:44 AM

Hi Albert K,  
 
We have already provided a sample which will load one-day data initially and you can navigate to next/previous day data with navigation. 
If your requirement is different from this, we kindly request you to provide more details for assisting you with most appropriate solution. 
 
Regards, 
Yuvaraj 


Albert K
Replied On September 20, 2016 09:11 PM

Hi,

I have enclosed an image of what I have done.  What I want to achieve is, How do I implement a way to scroll to the previous/next day?   The current chart "range navigator" is showing the full 24 hours of the day.  Thank you. 

Attachment: Screenshot_1_a366632b.zip

Yuvaraj Palanisamy [Syncfusion]
Replied On September 21, 2016 12:35 PM

Hi Albert K,   
 
We have prepared a workaround sample as per your requirement. Please find the sample from the below location. 
 
  
Please let us know if you have any concerns. 
 
Regards, 
Yuvaraj 


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.

;