]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 178043 - Make it possible to have vertical x-axis labels. Patch by gerv; r=joel.
authorgerv%gerv.net <>
Wed, 13 Nov 2002 16:29:12 +0000 (16:29 +0000)
committergerv%gerv.net <>
Wed, 13 Nov 2002 16:29:12 +0000 (16:29 +0000)
query.cgi
report.cgi
template/en/default/reports/report-bar.png.tmpl
template/en/default/reports/report-line.png.tmpl
template/en/default/search/search-report-graph.html.tmpl

index dec75628dcb6128083f38fd267374b85316a21fe..0d9c37235c77066ee227fb13d66b912f7279d079 100755 (executable)
--- a/query.cgi
+++ b/query.cgi
@@ -132,7 +132,7 @@ sub PrefillForm {
                       "status_whiteboard_type", "bug_id",
                       "bugidtype", "keywords", "keywords_type",
                       "x_axis_field", "y_axis_field", "z_axis_field",
-                      "chart_format", "cumulate") 
+                      "chart_format", "cumulate", "x_labels_vertical"
     {
         # This is a bit of a hack. The default, empty list has 
         # three entries to accommodate the needs of the email fields -
index 91d5074bcf67721ae7c11ff17ea0a2144fc7e900..5680ec466414ede30710c46352d7ccc7cc67cf5c 100755 (executable)
@@ -230,6 +230,7 @@ elsif ($action eq "plot") {
     # If action is "plot", we will be using a format as normal (pie, bar etc.)
     # and a ctype as normal (currently only png.)
     $vars->{'cumulate'} = $cgi->param('cumulate') ? 1 : 0;
+    $vars->{'x_labels_vertical'} = $cgi->param('x_labels_vertical') ? 1 : 0;
     $vars->{'data'} = \@image_data;
 }
 else {
index a3d73d45c3ebaed8d0cc3da01149528698439d8a..e199f115c3f230ca49e5751faaa299b4febcd93a 100644 (file)
 [% FILTER null;
   USE graph = GD.Graph.bars(width, height);
 
-  graph.set(x_label          => col_field_disp,
-            y_label          => y_label,
-            y_tick_number    => 8, 
-            y_number_format  => "%d", 
-            x_label_position => 0.5,
-            bar_spacing      => 8,
-            shadow_depth     => 4, 
-            shadowclr        => 'dred',
-            show_values      => 1,    
-            legend_placement => "RT");
+  graph.set(x_label           => col_field_disp,
+            y_label           => y_label,
+            y_tick_number     => 8, 
+            y_number_format   => "%d", 
+            x_label_position  => 0.5,
+            x_labels_vertical => x_labels_vertical,
+            bar_spacing       => 8,
+            shadow_depth      => 4, 
+            shadowclr         => 'dred',
+            show_values       => 1,    
+            legend_placement  => "RT");
   
-  graph.set(cumulate         => "true",
-            show_values      => 0) IF cumulate;
+  graph.set(cumulate          => "true",
+            show_values       => 0) IF cumulate;
   
   # Workaround for the fact that set_legend won't take row_names directly, 
   # because row_names is an array reference rather than an array.
index d0c7b2541cd3d6cc4a426cb8c7eaa943649edc86..1c84e1bf1a968e724f72ec69088aea946e8a466a 100644 (file)
 [% END %]
 
 [% FILTER null;
-  graph.set(x_label          => col_field_disp,
-            y_label          => y_label,
-            y_tick_number    => 8, 
-            x_label_position => 0.5,
-            legend_placement => "RT",
-            line_width       => 2);
+  graph.set(x_label           => col_field_disp,
+            y_label           => y_label,
+            y_tick_number     => 8, 
+            x_label_position  => 0.5,
+            x_labels_vertical => x_labels_vertical,
+            legend_placement  => "RT",
+            line_width        => 2);
   
   # Workaround for the fact that set_legend won't take row_names directly, 
   # because row_names is an array reference rather than an array.
index 8280fb0bbc6df45291854d3ade5946e5db43abfc..7bcdd365bf1841d094958ae774c8e732f94773de 100644 (file)
   <tr>
     <td>
     </td>
-    <td align="center">
+    <td align="left">
       <b>Horizontal Axis:</b>
-      [% PROCESS select name = 'x_axis_field' %]
-    </td>
+      [% PROCESS select name = 'x_axis_field' %]<br>
+      <label for="x_labels_vertical"><b>Vertical labels:</b></label>         
+      <input type="checkbox" name="x_labels_vertical" id="x_labels_vertical" 
+             value="1"
+         [% " checked" IF default.x_labels_vertical.0 == "1" %]>
+     </td>
     <td>
     </td>
   </tr>