WriteExcel/Chart/Column.pm

filter: Statementstmt 100% 29 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 1 totaltotal 97.1% 34 / 35 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« WriteExcel/Chart/Line.pm ↑ Summary
1 package Spreadsheet::WriteExcel::Chart::Column;
2  
3 ###############################################################################
4 #
5 # Column - A writer class for Excel Column charts.
6 #
7 # Used in conjunction with Spreadsheet::WriteExcel::Chart.
8 #
9 # See formatting note in Spreadsheet::WriteExcel::Chart.
10 #
11 # Copyright 2000-2010, John McNamara, jmcnamara@cpan.org
12 #
13 # Documentation after __END__
14 #
15  
16 3 require Exporter;
17  
18 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 3 ▶use Spreadsheet::WriteExcel::Chart;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21  
22 3 ▶use vars qw($VERSION @ISA);
Subroutine BEGIN: called CC=1 SCAR=0.0
23 3 @ISA = qw(Spreadsheet::WriteExcel::Chart Exporter);
24  
25 3 $VERSION = '2.40';
26  
27 ###############################################################################
28 #
29 # new()
30 #
31 #
32 3 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
33  
34 3 my $class = shift;
35 3 my $self = Spreadsheet::WriteExcel::Chart->new( @_ );
36  
37 3 bless $self, $class;
38 3 return $self;
39 }
40  
41  
42 ###############################################################################
43 #
44 # _store_chart_type()
45 #
46 # Implementation of the abstract method from the specific chart class.
47 #
48 # Write the BAR chart BIFF record. Defines a bar or column chart type.
49 #
50 3 ▶sub _store_chart_type {
Subroutine _store_chart_type: called CC=1 SCAR=0.0
51  
52 3 my $self = shift;
53  
54 3 my $record = 0x1017; # Record identifier.
55 3 my $length = 0x0006; # Number of bytes to follow.
56 3 my $pcOverlap = 0x0000; # Space between bars.
57 3 my $pcGap = 0x0096; # Space between cats.
58 3 my $grbit = 0x0000; # Option flags.
59  
60 3 my $header = pack 'vv', $record, $length;
61 3 my $data = '';
62 3 $data .= pack 'v', $pcOverlap;
63 3 $data .= pack 'v', $pcGap;
64 3 $data .= pack 'v', $grbit;
65  
66 3 $self->_append( $header, $data );
67 }
68  
69  
70 3 1;
71  
72  
73 __END__
« WriteExcel/Chart/Line.pm ↑ Summary