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

SFChart DateTimeAxis - visible range when scrolling

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?

2 Replies

SN sarath nagesh 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);
         }

}



GR Geetha Rajendran Syncfusion Team 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.  


Loader.
Live Chat Icon For mobile
Up arrow icon