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

SfDateTimeRangeNavigator

Hello Syncfusion Support!

We run into an issue with the 

In the top chart, you can see the correct data on the datetime axis. On the RangeNavigator we see not the accurate data. It looks like our range is starting between 2 and 4 (maybe 3). 


And from RangeNavigator.ViewRangeStart and RangeNavigator.ViewRangeEnd we get these values: 14.02.2019 16:18:47 - 14.02.2019 22:44:11. The data are from AM, not PM! It looks like the navigator is a little bit confused by german DateTime values.

Do you have any idea what went wrong? 

Thanks,
Sascha


5 Replies

MK Muneesh Kumar G Syncfusion Team February 14, 2019 09:44 PM

Hi Sascha, 
 
Greetings we have analyzed your query and we would like to inform you that by default RangePadding value set as Round in SfDateTimeRangeNavigator. So that lower bar rounds the data range to end of the date.  
 
However, you can resolve this problem by setting RangePadding as None in SfDateTimeRangeNavigator as per the below code snippet.  
 
Code snippet 
<chart:SfDateTimeRangeNavigator x:Name="RangeNavigator"  
                                            RangePadding="None" 
                                            ItemsSource="{Binding StockPriceDetails}"  
                                            XBindingPath="Date" > 
 
Also, we would like to know the lower level bar labels indicates the gridline range value as per the below screenshot. 
 
 
 
Hope this helps you.  
 
Thanks, 
Muneesh Kumar G. 



SA Sascha February 19, 2019 03:16 AM

Hi Syncfusion Support!

This approach works for us! Thank you very much!

Additional question to this topic. Is there any chance in the SfDateTimeRangeNavigator to have a format for the time in the 00:00-23:59 style? Like Labelformat in the SfCharts with "HH"?

regards,
Sascha


MK Muneesh Kumar G Syncfusion Team February 20, 2019 03:08 AM

Hi Sascha, 
 
Thanks for your update.  
 
We have analyzed your requirement and you can achieve this by setting LabelFormatters for Hour interval as per the below code snippet.  
 
Code snippet 
<chart:SfDateTimeRangeNavigator.Intervals> 
 
                    <chart:Interval IntervalType="Day" /> 
 
                    <chart:Interval IntervalType="Hour" x:Name="hourInterval"> 
                      
                    </chart:Interval> 
 
                </chart:SfDateTimeRangeNavigator.Intervals> 
 
public MainWindow() 
        { 
            InitializeComponent(); 
 
            hourInterval.LabelFormatters = new ObservableCollection<string>() { "HH"}; 
        } 
 
Screenshot: 
 
 
Hope this helps you.  
 
Regards,   
Muneesh Kumar G.   
 



SA Sascha February 20, 2019 03:40 AM

Hi Syncfuion Support!

Thank you for your answer!

Unfortunately, your approach doesn't work in our environment. 

With your approach, we get empty labels: 



Do you have any idea what went wrong? 

regards,
Sascha


MK Muneesh Kumar G Syncfusion Team February 21, 2019 04:42 AM

Hi Jason, 
  
Thanks for your update,  
  
We have prepared a sample to replicate the issue based, but we are afraid, that we are not able to reproduce the issue at our end. The sample we tried can be downloaded from the below location. 
  
  
Since we are not aware of your exact application scenario we were not able to reproduce this at our end, can you please revert us by modifying the sample based on your application along with replication procedure. This will be helpful for us to provide you better solution at the earliest.   
  
Regards,    
Muneesh Kumar G.    
 


Loader.
Live Chat Icon For mobile
Up arrow icon