OFC2/Line.pm

filter: Statementstmt 33.3% 1 / 3 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 50.0% 2 / 4 CC 1 SCAR 2.6
CC
1
Cov
33%
BEGIN
1.3
CRAP 1.3
« OFC2/Labels.pm ↑ Summary OFC2/Pie.pm »
1 package Chart::OFC2::Line;
2  
3 =head1 NAME
4  
5 Chart::OFC2::Line - OFC2 Line chart
6  
7 =head1 SYNOPSIS
8  
9 use Chart::OFC2;
10 use Chart::OFC2::Axis;
11 use Chart::OFC2::Line;
12
13 my $chart = Chart::OFC2->new(
14 'title' => 'Line chart test',
15 'x_axis' => Chart::OFC2::XAxis->new(
16 'labels' => [ 'Jan', 'Feb', 'Mar', 'Apr', 'May' ],
17 ),
18 );
19
20 my $line = Chart::OFC2::Line->new();
21 $line->values([ 1..5 ]);
22 $chart->add_element($line);
23  
24 print $chart->render_chart_data();
25  
26 =head1 DESCRIPTION
27  
28 extends 'Chart::OFC2::BarLineBase';
29  
30 =cut
31  
32 0 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=2.6
33 use MooseX::StrictConstructor;
34  
35 our $VERSION = '0.07';
36  
37 extends 'Chart::OFC2::BarLineBase';
38  
39 =head1 PROPERTIES
40  
41 has '+type_name' => (default => 'line');
42 has 'width' => (is => 'rw', isa => 'Int',);
43  
44 =cut
45  
46 has '+type_name' => (default => 'line');
47 has 'width' => (is => 'rw', isa => 'Int',);
48  
49  
50 1;
51  
52  
53 =head1 Chart::OFC2::Line::Dot
54  
55 Dotted line chart
56  
57 extends 'Chart::OFC2::Line';
58  
59 =cut
60  
61 package Chart::OFC2::Line::Dot;
62 use Moose;
63 use MooseX::StrictConstructor;
64 our $VERSION = '0.07';
65 extends 'Chart::OFC2::Line';
66  
67 =head1 PROPERTIES
68  
69 has '+type_name' => (default => 'line_dot');
70 has 'dot-size' => (is => 'rw', isa => 'Int',);
71  
72 =cut
73  
74 has '+type_name' => (default => 'line_dot');
75 has 'dot-size' => (is => 'rw', isa => 'Int',);
76  
77  
78 1;
79  
80  
81 =head1 Chart::OFC2::Line::Hollow
82  
83 Hollow line chart
84  
85 extends 'Chart::OFC2::Line::Dot';
86  
87 =cut
88  
89 package Chart::OFC2::Line::Hollow;
90 use Moose;
91 use MooseX::StrictConstructor;
92 our $VERSION = '0.07';
93 extends 'Chart::OFC2::Line::Dot';
94  
95 =head1 PROPERTIES
96  
97 has '+type_name' => (default => 'line_hollow');
98  
99 =cut
100  
101 has '+type_name' => (default => 'line_hollow');
102  
103 1;
104  
105  
106 =head1 Chart::OFC2::Area::Hollow
107  
108 Hollow line chart
109  
110 extends 'Chart::OFC2::Line::Dot';
111  
112 =cut
113  
114 package Chart::OFC2::Area::Hollow;
115 use Moose;
116 use MooseX::StrictConstructor;
117 our $VERSION = '0.07';
118 extends 'Chart::OFC2::Line::Dot';
119  
120 =head1 PROPERTIES
121  
122 has '+type_name' => (default => 'area_hollow');
123  
124 =cut
125  
126 has '+type_name' => (default => 'area_hollow');
127 has 'width' => (is => 'rw', isa => 'Int',);
128 has 'halo-size' => (is => 'rw', isa => 'Int',);
129 has 'fill-alpha' => (is => 'rw', isa => 'Num',);
130 has 'fill' => (is => 'rw', isa => 'Str',);
131 has 'text' => (is => 'rw', isa => 'Str',);
132  
133 1;
134  
« OFC2/Labels.pm ↑ Summary OFC2/Pie.pm »