chart.png.tmpl

来自「bugzilla的安装文件」· TMPL 代码 · 共 89 行

TMPL
89
字号
#------------------------------------------------------------------------# Compiled template generated by the Template Toolkit version 2.13#------------------------------------------------------------------------Template::Document->new({    METADATA => {        'modtime' => '1074980432',        '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 23 "template\en\default\reports\chart.png.tmpl"    $stash->set('y_label', 'Bugs');        #line 23 "template\en\default\reports\chart.png.tmpl"    $stash->set('x_label', 'Time');        $output .=  "\n";    #line 26 "template\en\default\reports\chart.png.tmpl"    if ($stash->get(['chart', 0, 'cumulate', 0])) {    #line 26 "template\en\default\reports\chart.png.tmpl"    # USE    $stash->set('graph',                $context->plugin('GD.Graph.area', [ $stash->get('width'), $stash->get('height') ]));    #line 26 "template\en\default\reports\chart.png.tmpl"    $output .=  $stash->get(['graph', 0, 'set', [ { 'cumulate' => 'true' } ]]);    }    else {    #line 26 "template\en\default\reports\chart.png.tmpl"    # USE    $stash->set('graph',                $context->plugin('GD.Graph.lines', [ $stash->get('width'), $stash->get('height') ]));    }        $output .=  "\n";    #line 29 "template\en\default\reports\chart.png.tmpl"        # FILTER    $output .=  do {        my $output = '';        my $filter = $context->filter('null')                  || $context->throw($context->error);        #line 29 "template\en\default\reports\chart.png.tmpl"    $stash->set('x_label_skip', (30 * $stash->get(['chart', 0, 'data', 0, 0, 0, 'size', 0]) / $stash->get('width')));        #line 29 "template\en\default\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 29 "template\en\default\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 29 "template\en\default\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 => {    },});

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?