[Bps-public-commit] r11672 - RT-Extension-Reports/html/Reports/Elements

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Apr 10 05:04:45 EDT 2008


Author: sunnavy
Date: Thu Apr 10 05:03:34 2008
New Revision: 11672

Modified:
   RT-Extension-Reports/html/Reports/Elements/SelectOutType
   RT-Extension-Reports/html/Reports/Elements/ShowResults

Log:
split chart outtype to bars and lines, and lines are trending

Modified: RT-Extension-Reports/html/Reports/Elements/SelectOutType
==============================================================================
--- RT-Extension-Reports/html/Reports/Elements/SelectOutType	(original)
+++ RT-Extension-Reports/html/Reports/Elements/SelectOutType	Thu Apr 10 05:03:34 2008
@@ -50,8 +50,10 @@
 ? 'checked="checked"' : () %> >Screen</input>
 <input type="radio" name="<% $Name %>" value="csv" <% $Default eq 'csv'
 ? 'checked="checked"' : () %>>csv File</input>
-<input type="radio" name="<% $Name %>" value="chart" <% $Default eq 'chart'
-? 'checked="checked"' : () %>>Chart</input>
+<input type="radio" name="<% $Name %>" value="bars" <% $Default eq 'bars'
+? 'checked="checked"' : () %>>Bars</input>
+<input type="radio" name="<% $Name %>" value="lines" <% $Default eq 'lines'
+? 'checked="checked"' : () %>>Lines</input>
 
 <%INIT>
 

Modified: RT-Extension-Reports/html/Reports/Elements/ShowResults
==============================================================================
--- RT-Extension-Reports/html/Reports/Elements/ShowResults	(original)
+++ RT-Extension-Reports/html/Reports/Elements/ShowResults	Thu Apr 10 05:03:34 2008
@@ -85,7 +85,7 @@
         }
         $m->abort;
     }
-    elsif ( $Type eq 'chart' ) {
+    else {
         my %sep;
         require WebChart;
 
@@ -107,8 +107,9 @@
             my $wc = WebChart->new( width => 800, height => 600, img_dir =>
 $RT::MasonComponentRoot . '/NoAuth/images/reports', web_img_dir =>
 '/NoAuth/images/reports' );
-            my $seg = $wc->render( data => \@data, type => 'bars',
-options => { legend_labels => [@$Headers[2 .. @$Headers -1]], title => $_ } );
+            my $seg = $wc->render( data => \@data, type => $Type,
+options => { legend_labels => [@$Headers[2 .. @$Headers -1]], title => $_ },
+);
             $html .= $seg;
         }
         $m->out( $html );



More information about the Bps-public-commit mailing list