Chart/Plotly/Adapter/Data/Frame.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 33 CC 1 SCAR 6.9
CC
1
Cov
0%
traces
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Chart::Plotly::Adapter::Data::Frame;
2  
3 use strict;
4 use warnings;
5 use utf8;
6  
7 use Moose;
8 use Chart::Plotly::Trace::Scatter;
9  
10 extends 'Chart::Plotly::Adapter';
11  
12 our $VERSION = '0.042'; # VERSION
13  
14 sub traces {
15 my $self = shift();
16 my $data_frame = $self->data;
17 my $header = $data_frame->column_names();
18 my @traces;
19 my $column_number = 0;
20 for my $column (@$header) {
21 push @traces,
22 Chart::Plotly::Trace::Scatter->new( y => $data_frame->nth_column( $column_number++ )->unpdl,
23 name => $column );
24 }
25 return \@traces;
26 }
27  
28 1;
29  
30 __END__