Hi everyone, While setting up Cacti, I tried to add 'Decade' graphs to it. The resulting x-axis labeling is a bit unreadable, hence this suggested patch for RRDtool. It adds major grid lines and labels per year, and minor divisions per quarter.
See also: http://a48046.upc-a.chello.nl/~paul/Mozilla-cpu-decade.html I prefer using %Y (four digit years) instead of %y (two digit years). The number '315360' for min_length was calculated to work for graphs of 5 years and longer, when 500 pixels wide. (365 * 24 * 3600 * 5 / 500). *** rrd_graph.c.org Fri Jul 14 14:11:26 2006 --- rrd_graph.c Mon Jul 17 11:16:00 2006 *************** *** 60,65 **** --- 60,66 ---- {3*3600, 0, TMT_WEEK,1, TMT_MONTH,1, TMT_WEEK,2, 7*24*3600,"Week %V"}, {6*3600, 0, TMT_MONTH,1, TMT_MONTH,1, TMT_MONTH,1, 30*24*3600,"%b"}, {48*3600, 0, TMT_MONTH,1, TMT_MONTH,3, TMT_MONTH,3, 30*24*3600,"%b"}, + { 315360, 0, TMT_MONTH,3, TMT_YEAR,1, TMT_YEAR,1, 365*24*3600,"%Y"}, {10*24*3600, 0, TMT_YEAR,1, TMT_YEAR,1, TMT_YEAR,1, 365*24*3600,"%y"}, {-1,0,TMT_MONTH,0,TMT_MONTH,0,TMT_MONTH,0,0,""} }; Regards, Paul Boven. -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/rrd-developers WebAdmin http://lists.ee.ethz.ch/lsg2.cgi