Chart / Graph scales - How to fix sensible values on the X axis
Posted on 2004-10-31
My Access runtime application includes plotting a graph from a table where the X axis is a date/time field with a variable time interval. The report can cover anything from a few hours up to several months, and from 2 to 2000+ records, so the AutoScaling feature is essential - and works well.
However, the axis label values that Access selects from the table nearly always look stupid, because say the range is 15/01/2004 15:54 to 18/01/2004 12:08 (which is 4096 minutes), Access will print 18 labels starting at the first record and then every 228 minutes (nearest 18th of 4096), eg 15/01/2004 15:54, 15/01/2004 19:42, 15/01/2004 23:30 etc. which is hardly easy to follow! A human would have chosen 4 hour gaps, and then plotted values at 16:00, 20:00, 24:00 etc.
(By the way, the number of labels you get seems to depend only on the size of font selected - the bigger the font, the less labels)
So, what I need is a way to stipulate the first value label (15/01/2004 16:00 in this example), and the gap (240 mins), whilst still graphing the full set of results as now.
Thanks for any help.