summaryrefslogtreecommitdiffstats
path: root/template/en/default/reports/chart.png.tmpl
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2013-11-06 15:08:45 +0100
committerFrédéric Buclin <LpSolit@gmail.com>2013-11-06 15:08:45 +0100
commit3e4bed239348cf5af0c70c3ab6315c0f24044959 (patch)
tree7592b7323eed03926695e472ab4bc5b9ccfa198e /template/en/default/reports/chart.png.tmpl
parentd8d3c0edd90267e23e4910fe550df4604a5ad75b (diff)
downloadbugzilla-3e4bed239348cf5af0c70c3ab6315c0f24044959.tar.gz
bugzilla-3e4bed239348cf5af0c70c3ab6315c0f24044959.tar.xz
Bug 287682: UTF-8 characters are incorrectly displayed in New Charts and graphical reports
r=wurblzap a=sgreen
Diffstat (limited to 'template/en/default/reports/chart.png.tmpl')
-rw-r--r--template/en/default/reports/chart.png.tmpl31
1 files changed, 15 insertions, 16 deletions
diff --git a/template/en/default/reports/chart.png.tmpl b/template/en/default/reports/chart.png.tmpl
index a464accd4..91944fee5 100644
--- a/template/en/default/reports/chart.png.tmpl
+++ b/template/en/default/reports/chart.png.tmpl
@@ -6,9 +6,6 @@
# defined by the Mozilla Public License, v. 2.0.
#%]
-[% y_label = "$terms.Bugs" %]
-[% x_label = "Time" %]
-
[% IF chart.cumulate %]
[% USE graph = GD.Graph.area(width, height) %]
[% graph.set(cumulate => "true") %]
@@ -19,8 +16,8 @@
[% FILTER null;
x_label_skip = (30 * chart.data.0.size / width);
- graph.set(x_label => x_label,
- y_label => y_label,
+ graph.set(x_label => "Time",
+ y_label => terms.Bugs,
y_tick_number => 8,
y_max_value => chart.y_max_value,
x_label_position => 0.5,
@@ -32,16 +29,18 @@
"lpurple", "lorange", "black", "green",
"blue", "dpink", "lbrown", "gray",
"red", "dpurple", "gold", "marine"]);
-
- # Workaround for the fact that set_legend won't take chart.labels directly,
- # because chart.labels is an array reference rather than an array.
- graph.set_legend(chart.labels.0, chart.labels.1, chart.labels.2,
- chart.labels.3, chart.labels.4, chart.labels.5,
- chart.labels.6, chart.labels.7, chart.labels.8,
- chart.labels.9, chart.labels.10, chart.labels.11,
- chart.labels.12, chart.labels.13, chart.labels.14,
- chart.labels.15);
-
- graph.plot(chart.data).png | stdout(1);
+
+ graph.set_legend(chart.labels);
END;
-%]
+
+[% IF Param("font_file") %]
+ [% graph.set_x_axis_font(Param("font_file"), 9);
+ graph.set_x_label_font(Param("font_file"), 10);
+ graph.set_y_axis_font(Param("font_file"), 9);
+ graph.set_y_label_font(Param("font_file"), 10);
+ graph.set_legend_font(Param("font_file"), 9);
+ %]
+[% END %]
+
+[% graph.plot(chart.data).png | stdout(1) %]