LDavies Posted May 15, 2007 Report Share Posted May 15, 2007 If I have numeric values on the x-axis, then I can specify a Min and Max value for the left and right limits of my graph. However, if the x-axis is a time line and my plotted points have a datetime datatype in the X value, then how can I specify a Min and Max datetime so that the graph "clips" the data on each side? Thanks in advance for any response! Link to comment Share on other sites More sharing options...
JuanC Posted May 16, 2007 Report Share Posted May 16, 2007 Internally we translate between dates and doubles using DateTime.ToOADate/DateTime.FromOADate. If you have a datetime variable you want to use for min (or max) you would say chart1.AxisX.Min = dateTimeMin.ToOADate(); Regards, JuanC Link to comment Share on other sites More sharing options...
LDavies Posted May 16, 2007 Author Report Share Posted May 16, 2007 Juan, You are THE MAN! This works just like I want it to. Mick Link to comment Share on other sites More sharing options...
JuanC Posted May 17, 2007 Report Share Posted May 17, 2007 I am glad it helped. There are some issues related to the accuracy of datetime conversion using the OADate approach, if you need more accuracy you may want to check this thread. JuanC Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.