Bug 53622
Configurable font and font size for graphs git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@471 6955db30-a419-402b-8a0d-67ecbb4d7f56master
parent
ccf93bbb3e
commit
f2bfceb72a
|
@ -67,6 +67,18 @@ sub get_param_list {
|
||||||
default => '5'
|
default => '5'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name => 'graph_font',
|
||||||
|
type => 't',
|
||||||
|
default => '',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name => 'graph_font_size',
|
||||||
|
type => 't',
|
||||||
|
default => '8',
|
||||||
|
},
|
||||||
|
|
||||||
);
|
);
|
||||||
return @param_list;
|
return @param_list;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
use lib qw(. lib);
|
use lib qw(. lib);
|
||||||
|
use GD::Text;
|
||||||
|
|
||||||
use Bugzilla;
|
use Bugzilla;
|
||||||
use Bugzilla::Constants;
|
use Bugzilla::Constants;
|
||||||
|
|
|
@ -49,5 +49,7 @@
|
||||||
webtwopibase => "Alternative program or URL for plotting dependency graphs (for example /usr/bin/twopi). May be slow sometimes.",
|
webtwopibase => "Alternative program or URL for plotting dependency graphs (for example /usr/bin/twopi). May be slow sometimes.",
|
||||||
graph_rankdir => "Default dependency graph orientation",
|
graph_rankdir => "Default dependency graph orientation",
|
||||||
localdottimeout => "Timeout for locally executed Graphviz instances in seconds",
|
localdottimeout => "Timeout for locally executed Graphviz instances in seconds",
|
||||||
|
graph_font => "Font name or path to TrueType font file to use on graphs",
|
||||||
|
graph_font_size => "Font size in points to use on graphs",
|
||||||
}
|
}
|
||||||
%]
|
%]
|
|
@ -44,7 +44,15 @@
|
||||||
"lpurple", "lorange", "black", "green",
|
"lpurple", "lorange", "black", "green",
|
||||||
"blue", "dpink", "lbrown", "gray",
|
"blue", "dpink", "lbrown", "gray",
|
||||||
"red", "dpurple", "gold", "marine"]);
|
"red", "dpurple", "gold", "marine"]);
|
||||||
|
|
||||||
|
graph.set_legend_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_title_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_x_label_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_y_label_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_x_axis_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_y_axis_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_values_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
|
||||||
# Workaround for the fact that set_legend won't take chart.labels directly,
|
# Workaround for the fact that set_legend won't take chart.labels directly,
|
||||||
# because chart.labels is an array reference rather than an array.
|
# because chart.labels is an array reference rather than an array.
|
||||||
graph.set_legend(chart.labels.0, chart.labels.1, chart.labels.2,
|
graph.set_legend(chart.labels.0, chart.labels.1, chart.labels.2,
|
||||||
|
|
|
@ -68,6 +68,14 @@
|
||||||
graph.set(cumulate => "true",
|
graph.set(cumulate => "true",
|
||||||
show_values => 0) IF cumulate;
|
show_values => 0) IF cumulate;
|
||||||
|
|
||||||
|
graph.set_legend_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_title_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_x_label_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_y_label_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_x_axis_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_y_axis_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_values_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
|
||||||
# Workaround for the fact that set_legend won't take row_names directly,
|
# Workaround for the fact that set_legend won't take row_names directly,
|
||||||
# because row_names is an array reference rather than an array.
|
# because row_names is an array reference rather than an array.
|
||||||
graph.set_legend(row_names.0, row_names.1, row_names.2, row_names.3,
|
graph.set_legend(row_names.0, row_names.1, row_names.2, row_names.3,
|
||||||
|
|
|
@ -70,6 +70,14 @@
|
||||||
"blue", "dpink", "lbrown", "gray",
|
"blue", "dpink", "lbrown", "gray",
|
||||||
"red", "dpurple", "gold", "marine"]);
|
"red", "dpurple", "gold", "marine"]);
|
||||||
|
|
||||||
|
graph.set_legend_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_title_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_x_label_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_y_label_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_x_axis_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_y_axis_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_values_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
|
||||||
# Workaround for the fact that set_legend won't take row_names directly,
|
# Workaround for the fact that set_legend won't take row_names directly,
|
||||||
# because row_names is an array reference rather than an array.
|
# because row_names is an array reference rather than an array.
|
||||||
graph.set_legend(row_names.0, row_names.1, row_names.2, row_names.3,
|
graph.set_legend(row_names.0, row_names.1, row_names.2, row_names.3,
|
||||||
|
|
|
@ -42,6 +42,14 @@
|
||||||
suppress_angle => 2,
|
suppress_angle => 2,
|
||||||
start_angle => 180);
|
start_angle => 180);
|
||||||
|
|
||||||
|
graph.set_legend_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_title_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_x_label_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_y_label_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_x_axis_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_y_axis_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
graph.set_values_font(Param('graph_font'), Param('graph_font_size'));
|
||||||
|
|
||||||
graph.plot(data.0).png | stdout(1);
|
graph.plot(data.0).png | stdout(1);
|
||||||
END;
|
END;
|
||||||
-%]
|
-%]
|
||||||
|
|
Loading…
Reference in New Issue