I routinely graph time series data in Excel, and I find the default Excel date-axis labeling on line graphs to be very ugly. In particular,
1) Dates are often rotated horizontally or vertically, which compresses plot area real estate and makes the date labels harder to read. This is because there are two many major tick marks.
2) Labels show too much precision: time series databases will typically dump something like a monthly time series into the spreadsheet with date values like 1/1/2001, 2/1/2001, etc. Excel will try to show the full mm/dd/yyyy date string by default, which might be preferable for a short daily time series but is undesirable for a non-daily series or a series that runs over a long time period. In these cases, formatting like mm/yyyy or yyyy might be preferable.
My question is, does anyone have a good algorithm already written that can make a pretty date label axis? Horizontal labels only with ticks spaced far enough to accommodate that, and intelligent formatting of the date as the data starts to cover a longer and longer time span (i.e. labels that transform from 1/1/2001 to 1/2001 to 2001). I will ultimately have to write this using VBA, but I could translate an algorithm written in another language.
Thanks.