Hello,
I am trying to convert the time entered in the xamtimeeditors to the range values and noticing an offset in the maximum value till 12:06 but seems good after 12:45. Can you please let me know the problem. I have also attached the project along with the screenshot.
Looks good , Thanks
Hi Gopi,
So trying to calculate the correct min and max with an offset is probably not the best way to do this. Instead I tried adjusting the margin of the chart and the preview element that the zoombar uses because right now it defaults to a pretty large margin which is throwing off your original calculations. If we can line up the chart with the zoombar thumb properly then you can use your original calculations unaltered.
Take a look at the attached sample where I adjust the margins. It seems to work very well with your original code and it works both ways. I can type in a time or I can move the thumb and the time will update correctly.
Let me know if you have any questions.
The time 10:09 to 1048
This is good enough only when we map the time input to zoombar min and max values but the vice versa is failing i.e from the zoom bar to date time. i.e by changing the zoom bar the values in date time input looks incorrect.
It is tricky to try and map the zoombar min and max to the min and max in the data chart. I had to do a little trial and error in order to find suitable values for the calculation but I think I settled on a good set of numbers. I updated your sample with the calculation.