-$scale = 8; # em width per year
-$mindate = strtotime($date) + ($year / $scale * 3); # first point plus about 3em for centered text
+$scale = 7; # em width per year
+$mindate = max(time(), strtotime($date) + ($year / $scale * 3)); # at least last entry plus 3em for centered text
+$length = ($mindate - strtotime(key(current($cal)))) / $year * $scale; # earliest entry position