blob: e8911096853d49b1d7e231d9c990fa1094f1772b [file] [log] [blame]
#------------------------------------------------------------------------
# Compiled template generated by the Template Toolkit version 2.15
#------------------------------------------------------------------------
Template::Document->new({
METADATA => {
'modtime' => '1138010588',
'name' => 'reports/chart.png.tmpl',
},
BLOCK => sub {
my $context = shift || die "template sub called without context\n";
my $stash = $context->stash;
my $output = '';
my $error;
eval { BLOCK: {
$output .= "\n";
$output .= "\n";
#line 22 "template/en/custom/reports/chart.png.tmpl"
$stash->set('y_label', 'Bugs');
#line 23 "template/en/custom/reports/chart.png.tmpl"
$stash->set('x_label', 'Time');
$output .= "\n";
#line 30 "template/en/custom/reports/chart.png.tmpl"
if ($stash->get(['chart', 0, 'cumulate', 0])) {
#line 26 "template/en/custom/reports/chart.png.tmpl"
# USE
$stash->set('graph',
$context->plugin('GD.Graph.area', [ $stash->get('width'), $stash->get('height') ]));
#line 27 "template/en/custom/reports/chart.png.tmpl"
$output .= $stash->get(['graph', 0, 'set', [ { 'cumulate' => 'true' } ]]);
}
else {
#line 29 "template/en/custom/reports/chart.png.tmpl"
# USE
$stash->set('graph',
$context->plugin('GD.Graph.lines', [ $stash->get('width'), $stash->get('height') ]));
}
$output .= "\n";
#line 32 "template/en/custom/reports/chart.png.tmpl"
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('null')
|| $context->throw($context->error);
#line 32 "template/en/custom/reports/chart.png.tmpl"
$stash->set('x_label_skip', (30 * $stash->get(['chart', 0, 'data', 0, 0, 0, 'size', 0]) / $stash->get('width')));
#line 32 "template/en/custom/reports/chart.png.tmpl"
$output .= $stash->get(['graph', 0, 'set', [ { 'x_label' => $stash->get('x_label'), 'y_label' => $stash->get('y_label'), 'y_tick_number' => 8, 'x_label_position' => 0.5, 'x_labels_vertical' => 1, 'x_label_skip' => $stash->get('x_label_skip'), 'legend_placement' => 'RT', 'line_width' => 2, 'dclrs' => [ 'lred', 'lgreen', 'lblue', 'lyellow', 'lpurple', 'lorange', 'black', 'green', 'blue', 'dpink', 'lbrown', 'gray', 'red', 'dpurple', 'gold', 'marine' ] } ]]);
#line 32 "template/en/custom/reports/chart.png.tmpl"
$output .= $stash->get(['graph', 0, 'set_legend', [ $stash->get(['chart', 0, 'labels', 0, 0, 0]), $stash->get(['chart', 0, 'labels', 0, 1, 0]), $stash->get(['chart', 0, 'labels', 0, 2, 0]), $stash->get(['chart', 0, 'labels', 0, 3, 0]), $stash->get(['chart', 0, 'labels', 0, 4, 0]), $stash->get(['chart', 0, 'labels', 0, 5, 0]), $stash->get(['chart', 0, 'labels', 0, 6, 0]), $stash->get(['chart', 0, 'labels', 0, 7, 0]), $stash->get(['chart', 0, 'labels', 0, 8, 0]), $stash->get(['chart', 0, 'labels', 0, 9, 0]), $stash->get(['chart', 0, 'labels', 0, 10, 0]), $stash->get(['chart', 0, 'labels', 0, 11, 0]), $stash->get(['chart', 0, 'labels', 0, 12, 0]), $stash->get(['chart', 0, 'labels', 0, 13, 0]), $stash->get(['chart', 0, 'labels', 0, 14, 0]), $stash->get(['chart', 0, 'labels', 0, 15, 0]) ]]);
#line 32 "template/en/custom/reports/chart.png.tmpl"
# FILTER
$output .= do {
my $output = '';
my $filter = $context->filter('stdout', [ 1 ])
|| $context->throw($context->error);
$output .= $stash->get(['graph', 0, 'plot', [ $stash->get(['chart', 0, 'data', 0]) ], 'png', 0]);
&$filter($output);
};
&$filter($output);
};
$output .= "\n";
} };
if ($@) {
$error = $context->catch($@, \$output);
die $error unless $error->type eq 'return';
}
return $output;
},
DEFBLOCKS => {
},
});