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

SFChart DateTimeAxis - visible range when scrolling

Thread ID:

Created:

Updated:

Platform:

Replies:

140848 Nov 11,2018 08:37 AM UTC Nov 12,2018 09:14 AM UTC Xamarin.iOS 2
loading
Tags: SfChart
sarath nagesh
Asked On November 11, 2018 08:37 AM UTC

I've setup my chart with DateTimeAxis as primary axis showing only a fixed number of days initially and allows scrolling to view the remaining days. 

Now I want to update a label above the chart with the currently visible date range when scrolling (like "10 Nov - 17 Nov"). 

How can I achieve this?

sarath nagesh
Replied On November 11, 2018 08:52 AM UTC

Nevermind, just found the answer myself.


public class ChartDelegate : SFChartDelegate
{

public override void DidPan(SFChart chart, SFChartPanInfo info)
         {
                DateTime start = DateTime.FromOADate(info.Axis.VisibleRange.Start);
                DateTime end = DateTime.FromOADate(info.Axis.VisibleRange.End);

                Console.WriteLine("Start: " + start + " --- End: " + end);
         }

}


Geetha Rajendran [Syncfusion]
Replied On November 12, 2018 09:14 AM UTC

  
Hi Sarath,  
  
Glad you have found the solution, feel free to contact us any time if you need any other assistance from us.  
  
Regards, 
Geetha R.  


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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

;