112 |
return "<a href=\"".$q->url(-relative=>1)."?from_t=${f}&to_t=${t}\">$ch</a>"; |
return "<a href=\"".$q->url(-relative=>1)."?from_t=${f}&to_t=${t}\">$ch</a>"; |
113 |
} |
} |
114 |
|
|
115 |
print "<table>"; |
print "<table cellspacing=0 cellpadding=0>"; |
116 |
print "<tr bgcolor=#e0e0e0><td>Specification</td><td align=left>"; |
print "<tr bgcolor=#e0e0e0><td>Specification</td><td align=left>"; |
117 |
print mknav(($from_t-$int_t),$to_t,'<small><<</small>'),$from; |
print mknav(($from_t-$int_t),$to_t,'<small><<</small>'),$from; |
118 |
print mknav(($from_t+$int_t),$to_t,'<small>>></small>') if ($from_t+$int_t < $to_t); |
print mknav(($from_t+$int_t),$to_t,'<small>>></small>') if ($from_t+$int_t < $to_t); |
136 |
|
|
137 |
hour_grid(); |
hour_grid(); |
138 |
|
|
139 |
my $fix_d = 0; # used to fix graph len |
my $fix_d = 0; # used to fix graph len (in pixels) |
140 |
|
my $fix_s = 0; # used to collect round errors of size |
141 |
|
|
142 |
sub bar { |
sub bar { |
143 |
my $l = shift @_; |
my $l = shift @_; |
165 |
my $col = shift @_ || '240,240,240'; # default color (filler) |
my $col = shift @_ || '240,240,240'; # default color (filler) |
166 |
my $alt = shift @_ || undef; |
my $alt = shift @_ || undef; |
167 |
|
|
168 |
my $size = int($l / ($len_t / $width)); |
my $size = $l / ($len_t / $width); |
169 |
if ($size < $min_l) { |
$fix_s += $size - int($size); |
170 |
|
$size=int($size); |
171 |
|
if ($fix_s > 1) { |
172 |
|
$fix_s -= 1; |
173 |
|
$size++; |
174 |
|
} |
175 |
|
|
176 |
|
if ($alt && $size < $min_l) { |
177 |
$fix_d += ($min_l - $size); |
$fix_d += ($min_l - $size); |
178 |
print STDERR "fix_d: $fix_d\n" if ($debug); |
print STDERR "fix_d: $fix_d\n" if ($debug); |
179 |
$size = $min_l; |
$size = $min_l; |