[freeside-commits] freeside/rt/html/RTx/Statistics/CallsMultiQueue/Elements Chart, NONE, 1.1
Ivan,,,
ivan at wavetail.420.am
Wed Jun 20 15:28:23 PDT 2007
Update of /home/cvs/cvsroot/freeside/rt/html/RTx/Statistics/CallsMultiQueue/Elements
In directory wavetail:/tmp/cvs-serv10214/rt/html/RTx/Statistics/CallsMultiQueue/Elements
Added Files:
Chart
Log Message:
integrate RTx::Statistics package, part of merging spiritone RT changes (#1661)
--- NEW FILE: Chart ---
<%perl>
$r->content_type("image/$format");
print $graph->plot(\@data)->$format();
$m->abort();
</%perl>
<em><&|/l, $#data+1&>[_1] Plot Elements</&></em><p>
% foreach my $value (@data) {
<% $value %><p>
% }
<em><&|/l&>x_labels</&>:</em><p>
<% $ARGS{x_labels} %>
<p>
<em><&|/l&>legend</&>:</em><p>
<% $ARGS{set_legend} %>
<p>
<em><&|/l, (keys %ARGS) - 2&>[_1] data sets</&>:</em><p>
% for (1..(scalar keys %ARGS)-2) {
<% $_ %> <% $ARGS{"data$_"} %><p>
% }
<%INIT>
use GD::Graph::lines;
my @data;
my $graph = GD::Graph::lines->new($Statistics::GraphWidth,$Statistics::GraphHeight);
$graph->set(export_format => "png",
x_label => 'Day of Week',
y_label => 'Tickets per day');
$graph->set_legend(split /,/ , $ARGS{set_legend});
my $format = $graph->export_format;
push @data, [split /,/ , $ARGS{x_labels}];
for (1..((scalar keys %ARGS)-2)) {
push @data, [split /,/ , $ARGS{"data".$_}];
}
</%INIT>
<%ARGS>
</%ARGS>
More information about the freeside-commits
mailing list