From: gerv%gerv.net <> Date: Wed, 13 Nov 2002 16:29:12 +0000 (+0000) Subject: Bug 178043 - Make it possible to have vertical x-axis labels. Patch by gerv; r=joel. X-Git-Tag: bugzilla-2.17.2~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cd838d6aa5e4a42e4989aa034f7dc452c0581fb;p=thirdparty%2Fbugzilla.git Bug 178043 - Make it possible to have vertical x-axis labels. Patch by gerv; r=joel. --- diff --git a/query.cgi b/query.cgi index dec75628dc..0d9c37235c 100755 --- 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 - diff --git a/report.cgi b/report.cgi index 91d5074bcf..5680ec4664 100755 --- a/report.cgi +++ b/report.cgi @@ -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 { diff --git a/template/en/default/reports/report-bar.png.tmpl b/template/en/default/reports/report-bar.png.tmpl index a3d73d45c3..e199f115c3 100644 --- a/template/en/default/reports/report-bar.png.tmpl +++ b/template/en/default/reports/report-bar.png.tmpl @@ -28,19 +28,20 @@ [% 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. diff --git a/template/en/default/reports/report-line.png.tmpl b/template/en/default/reports/report-line.png.tmpl index d0c7b2541c..1c84e1bf1a 100644 --- a/template/en/default/reports/report-line.png.tmpl +++ b/template/en/default/reports/report-line.png.tmpl @@ -33,12 +33,13 @@ [% 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. diff --git a/template/en/default/search/search-report-graph.html.tmpl b/template/en/default/search/search-report-graph.html.tmpl index 8280fb0bbc..7bcdd365bf 100644 --- a/template/en/default/search/search-report-graph.html.tmpl +++ b/template/en/default/search/search-report-graph.html.tmpl @@ -87,10 +87,14 @@ - + Horizontal Axis: - [% PROCESS select name = 'x_axis_field' %] - + [% PROCESS select name = 'x_axis_field' %]
+ + +