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

filter: Statementstmt 0.0% 0 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 34 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::Table;
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 has options => ( is => 'ro',
15 isa => 'HashRef' );
16  
17 sub traces {
18 my $self = shift();
19 my $table = $self->data();
20 my @header = $table->header();
21 my @traces;
22 for my $column (@header) {
23 push @traces,
24 Chart::Plotly::Trace::Scatter->new( y => [ $table->col($column) ],
25 name => $column );
26 }
27 return \@traces;
28 }
29  
30 1;
31  
32 __END__