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

Date time Xaxis

Hey,

I am trying to plot different graphs on a chartcontrol.
They all have date times (format HH:mm)on the PrimaryXaxis, yet instead of scalling my axis to start at the time of the first point and end at the time of the last, it starts and ends about 2/3 hours before/after.

When I use "PrimaryXAxis.DateTimeRange" I have to give the intervalls yet I would like for them to be automatically given (it least in that case they stay "clean" times eg :
-if my first time is 08:53 and last is 13:00, I would want my chart to start at 08:50 in show every 30min for eg
- if my fisrt is 08:53 lat 18: then I would want it to show every hour for eg so the Xaxis stays clean)

Thanks in advance for your help


1 Reply

VK Vijayabharathi K Syncfusion Team September 6, 2011 03:06 PM UTC

Hi Clo,

Thanks for using Syncfusion products.

If your intention is to set different date time interval to chart axis based on data points value(first and last value), we suggest you to calculate the hour between start and end time of data point and then set appropriate interval type to date time range. Please find the attached sample for this query.

Please let us know if we misunderstood your query please provide us some clear details and screenshots about this issue otherwise try to reproducing the issue in the above sample and send us the modified sample, so that we could sort out the cause of the issue and provide you a solution.

Regards,
Vijayabharathi





Sample_XDateTime_1404cad4.zip

Loader.
Live Chat Icon For mobile
Up arrow icon