diff options
Diffstat (limited to 'rt/html/RTx/Statistics/CallsQueueDay/Elements/Chart')
-rwxr-xr-x | rt/html/RTx/Statistics/CallsQueueDay/Elements/Chart | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/rt/html/RTx/Statistics/CallsQueueDay/Elements/Chart b/rt/html/RTx/Statistics/CallsQueueDay/Elements/Chart new file mode 100755 index 0000000..9a3a505 --- /dev/null +++ b/rt/html/RTx/Statistics/CallsQueueDay/Elements/Chart @@ -0,0 +1,29 @@ +<%perl> +$r->content_type("image/$format"); +print $graph->plot(\@data)->$format(); +$m->abort(); +print $#data+1 . " Elements:<p>"; +for (0..$#data) { +print $data[$_]; +print "<p>"; +} +</%perl> +<%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', + x_labels_vertical => 1, + ); +my $format = $graph->export_format; +$graph->set_legend(split /,/ , $ARGS{set_legend}); +push @data, [split /,/ , $ARGS{x_labels}]; +push @data, [split /,/ , $ARGS{data1}]; +push @data, [split /,/ , $ARGS{data2}]; +push @data, [split /,/ , $ARGS{data3}]; +</%INIT> +<%ARGS> +</%ARGS> |