diff options
author | cvs2git <cvs2git> | 2008-03-16 19:58:34 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2008-03-16 19:58:34 +0000 |
commit | eb061f5119325e666f0dff40d4089e5c1df58e17 (patch) | |
tree | d55e8fef5aca62eb13bbc8ad20dbdf941c3bd266 /rt/html/Reports/Activity/Elements/MiniPlot | |
parent | 3a17b276638200475d54201fa62566b7440e819a (diff) |
This commit was manufactured by cvs2svn to create tag 'TRIXBOX_2_6'.TRIXBOX_2_6
Diffstat (limited to 'rt/html/Reports/Activity/Elements/MiniPlot')
-rw-r--r-- | rt/html/Reports/Activity/Elements/MiniPlot | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/rt/html/Reports/Activity/Elements/MiniPlot b/rt/html/Reports/Activity/Elements/MiniPlot deleted file mode 100644 index f92032818..000000000 --- a/rt/html/Reports/Activity/Elements/MiniPlot +++ /dev/null @@ -1,57 +0,0 @@ -<table class="miniplot"><tr> -% for my $major (@major) { -<td><div class="graph"> - <ul> -% my $i = 0; -% for my $minor (@minor) { -% my $percent = int( 100 * ($data->{$major}{$minor} || 0) / $max ); - <li class="c<% ($i % 6) + 1%>" style="width: <% $barwidth %>%; - left: <% $baroffset + $each * $i %>%; - height: <% $percent %>%;"><div class="data"><% $minor %>: <% $percent %>%</div></li> -% $i++; -% } - </ul> -</div></td> -% } -</tr><tr> -% for my $major (@major) { -<th class="legend"><% $major %></th> -% } -</tr> -</table> - -<table class="miniplot"><tr> -% my $i = 0; -% for my $minor (@minor) { -<th><span class="demoblock c<% ($i++ % 6) + 1 %>"></span> <% $minor %></th> -% } -</tr> -</table> - -<%args> -$data -$major => undef -$minor => undef -</%args> -<%init> - -my $max = 1; - -my %minor; -for my $major (keys %{$data}) { - for (keys %{$data->{$major}}) { - $minor{$_}++; - $max = $data->{$major}{$_} if $data->{$major}{$_} > $max; - } -} - -my @major = $major ? @{$major} : sort keys %{$data}; -my @minor = $minor ? @{$minor} : sort keys %minor; - -return unless @minor and @major; - -my $each = int( (100 / @minor) ); -my $barwidth = int( (100 / @minor) * (3/4) ); -my $baroffset = int( (100 / @minor) * (1/8) ); - -</%init> |