SfDateTimeRangeNavigator
Hello Syncfusion Support!
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
SIGN IN To post a reply.
5 Replies
MK
Muneesh Kumar G
Syncfusion Team
February 15, 2019 05:44 AM UTC
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 11:16 AM UTC
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 11:08 AM UTC
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 11:40 AM UTC
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 12:42 PM UTC
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.
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
SA Sascha
- Feb 14, 2019 11:15 AM UTC
- Feb 21, 2019 12:42 PM UTC