|
private void SfChart_ZoomChanged(object sender, Syncfusion.UI.Xaml.Charts.ZoomChangedEventArgs e)
{
if (e.Axis is DateTimeCategoryAxis)
{
var axis = e.Axis as DateTimeCategoryAxis;
int startIndex =(int) axis.VisibleRange.Start;
int endIndex = (int)axis.VisibleRange.End;
DateTime visibleStartDate = (view.Collection as ObservableCollection<Model>)[startIndex].XValue;
DateTime visibleEndDate = (view.Collection as ObservableCollection<Model>)[endIndex].XValue;
}
} |
|
private void RangeNavigator_ValueChanged(object sender, EventArgs e)
{
SfDateTimeRangeNavigator rangeNavigator = sender as SfDateTimeRangeNavigator;
var viewRangeStartDate = rangeNavigator.ViewRangeStart;
var vieeRangeEndDate = rangeNavigator.ViewRangeEnd;
} |
|
<chart:SfDateTimeRangeNavigator
ItemsSource="{Binding StockPriceDetails}"
ValueChanged="RangeNavigator_ValueChanged"
//you need to set minimum date value to ViewRangeStart and Maximum value to ViewRangeEnd
ViewRangeStart="2012/1/1 12:00am" ViewRangeEnd="2012/1/1 11:00pm"
XBindingPath="Date"> |
|
<chart:SfDateTimeRangeNavigator
RangePadding="None"
ItemsSource="{Binding StockPriceDetails}"
ValueChanged="RangeNavigator_ValueChanged"
ViewRangeEnd="2017/11/14 11:00pm"
ViewRangeStart="2017/11/13 12:00am"
XBindingPath="date"/> |
Hi Martin,Thanks for contacting Syncfusion Support.It is possible to keep the minimum as less than 60 minutes from now and maximum as greater than 5 minutes from now until user zoom and pan the Chart. But, we need to specify the minimum and maximum to restrict the panning at each direction instead of infinitive. So, could you please let us know the purpose of panning at each direction whether it contains data or you would like to show the empty Chart.Regards,Durgadevi S
