| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Chart::OFC::Dataset::HighLowClose; |
|
2
|
|
|
|
|
|
|
$Chart::OFC::Dataset::HighLowClose::VERSION = '0.12'; |
|
3
|
16
|
|
|
16
|
|
13384
|
use strict; |
|
|
16
|
|
|
|
|
41
|
|
|
|
16
|
|
|
|
|
1810
|
|
|
4
|
16
|
|
|
16
|
|
90
|
use warnings; |
|
|
16
|
|
|
|
|
33
|
|
|
|
16
|
|
|
|
|
482
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
16
|
|
|
16
|
|
83
|
use Moose; |
|
|
16
|
|
|
|
|
31
|
|
|
|
16
|
|
|
|
|
103
|
|
|
7
|
16
|
|
|
16
|
|
145757
|
use MooseX::StrictConstructor; |
|
|
16
|
|
|
|
|
42
|
|
|
|
16
|
|
|
|
|
150
|
|
|
8
|
16
|
|
|
16
|
|
55436
|
use Chart::OFC::Types; |
|
|
16
|
|
|
|
|
48
|
|
|
|
16
|
|
|
|
|
3536
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
extends 'Chart::OFC::Dataset::Line'; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has values => |
|
13
|
|
|
|
|
|
|
( is => 'ro', |
|
14
|
|
|
|
|
|
|
isa => 'Chart::OFC::Type::NonEmptyArrayRefOfArrayRefsOfNumsOrUndefs', |
|
15
|
|
|
|
|
|
|
required => 1, |
|
16
|
|
|
|
|
|
|
auto_deref => 1, |
|
17
|
|
|
|
|
|
|
); |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
has opacity => |
|
20
|
|
|
|
|
|
|
( is => 'ro', |
|
21
|
|
|
|
|
|
|
isa => 'Chart::OFC::Type::Opacity', |
|
22
|
|
|
|
|
|
|
default => '80', |
|
23
|
|
|
|
|
|
|
); |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub type |
|
26
|
|
|
|
|
|
|
{ |
|
27
|
4
|
|
|
4
|
0
|
12
|
return 'hlc'; |
|
28
|
|
|
|
|
|
|
} |
|
29
|
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
sub _parameters_for_type |
|
31
|
|
|
|
|
|
|
{ |
|
32
|
8
|
|
|
8
|
|
16
|
my $self = shift; |
|
33
|
|
|
|
|
|
|
|
|
34
|
8
|
|
|
|
|
393
|
my @p = ( $self->opacity(), $self->width(), $self->color() ); |
|
35
|
|
|
|
|
|
|
|
|
36
|
8
|
100
|
|
|
|
358
|
push @p, ( $self->label(), $self->text_size() ) |
|
37
|
|
|
|
|
|
|
if $self->_has_label(); |
|
38
|
|
|
|
|
|
|
|
|
39
|
8
|
|
|
|
|
88
|
return @p; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
|
|
|
|
|
|
|
|
42
|
16
|
|
|
16
|
|
114
|
no Moose; |
|
|
16
|
|
|
|
|
38
|
|
|
|
16
|
|
|
|
|
101
|
|
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
__PACKAGE__->meta()->make_immutable(); |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# ABSTRACT: A dataset represented as an hlc line for each value |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=pod |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 NAME |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
Chart::OFC::Dataset::HighLowClose - A dataset represented as an hlc line for each value |
|
57
|
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head1 VERSION |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
version 0.12 |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
my @numbers = ( [ 1, 2, 3 ], [ 3, 2, 1 ] ); |
|
65
|
|
|
|
|
|
|
my $hlc = Chart::OFC::Dataset::HighLowClose->new( |
|
66
|
|
|
|
|
|
|
values => \@numbers, |
|
67
|
|
|
|
|
|
|
width => 5, |
|
68
|
|
|
|
|
|
|
color => 'purple', |
|
69
|
|
|
|
|
|
|
label => 'Daily Sales in $', |
|
70
|
|
|
|
|
|
|
text_size => 12, |
|
71
|
|
|
|
|
|
|
opacity => 80, |
|
72
|
|
|
|
|
|
|
); |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
This class contains values to be charted as High-Low-Close points on a grid chart. |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=for Pod::Coverage type |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This class has several attributes which may be passed to the C<new()> |
|
83
|
|
|
|
|
|
|
method. |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
It is a subclass of C<Chart::OFC::Dataset::Line> and accepts all of |
|
86
|
|
|
|
|
|
|
that class's attributes as well as its own. |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head2 values |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
This dataset accepts an arrayref which in turn contains one or more |
|
91
|
|
|
|
|
|
|
array references, each of which contains a set of values. |
|
92
|
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
=head2 opacity |
|
94
|
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
Sets the opacity of the line. |
|
96
|
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Defaults to 80. |
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head1 ROLES |
|
100
|
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
This class does the C<Chart::OFC::Role::OFCDataLines> role. |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=head1 AUTHOR |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Dave Rolsky <autarch@urth.org> |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
This software is Copyright (c) 2014 by Dave Rolsky. |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
This is free software, licensed under: |
|
112
|
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
The Artistic License 2.0 (GPL Compatible) |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=cut |