File Coverage

blib/lib/Chart/Plotly/Trace/Scatter/Unselected.pm
Criterion Covered Total %
statement 15 31 48.3
branch 0 8 0.0
condition 0 8 0.0
subroutine 5 6 83.3
pod 1 1 100.0
total 21 54 38.8


line stmt bran cond sub pod time code
1             use Moose;
2 4     4   24 use MooseX::ExtraArgs;
  4         7  
  4         30  
3 4     4   22642 use Moose::Util::TypeConstraints qw(enum union);
  4         11  
  4         32  
4 4     4   7446 if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) {
  4         9  
  4         34  
5             Moose::Util::TypeConstraints::type('PDL');
6             }
7              
8             use Chart::Plotly::Trace::Scatter::Unselected::Marker;
9 4     4   4256 use Chart::Plotly::Trace::Scatter::Unselected::Textfont;
  4         14  
  4         147  
10 4     4   2071  
  4         11  
  4         1025  
11             our $VERSION = '0.042'; # VERSION
12              
13             # ABSTRACT: This attribute is one of the possible options for the trace scatter.
14              
15             my $self = shift;
16             my $extra_args = $self->extra_args // {};
17 0     0 1   my $meta = $self->meta;
18 0   0       my %hash = %$self;
19 0           for my $name ( sort keys %hash ) {
20 0           my $attr = $meta->get_attribute($name);
21 0           if ( defined $attr ) {
22 0           my $value = $hash{$name};
23 0 0         my $type = $attr->type_constraint;
24 0           if ( $type && $type->equals('Bool') ) {
25 0           $hash{$name} = $value ? \1 : \0;
26 0 0 0       }
27 0 0         }
28             }
29             %hash = ( %hash, %$extra_args );
30             delete $hash{'extra_args'};
31 0           if ( $self->can('type') && ( !defined $hash{'type'} ) ) {
32 0           $hash{type} = $self->type();
33 0 0 0       }
34 0           return \%hash;
35             }
36 0            
37             has marker => ( is => "rw",
38             isa => "Maybe[HashRef]|Chart::Plotly::Trace::Scatter::Unselected::Marker", );
39              
40             has textfont => ( is => "rw",
41             isa => "Maybe[HashRef]|Chart::Plotly::Trace::Scatter::Unselected::Textfont", );
42              
43             __PACKAGE__->meta->make_immutable();
44             1;
45              
46              
47             =pod
48              
49             =encoding utf-8
50              
51             =head1 NAME
52              
53             Chart::Plotly::Trace::Scatter::Unselected - This attribute is one of the possible options for the trace scatter.
54              
55             =head1 VERSION
56              
57             version 0.042
58              
59             =head1 SYNOPSIS
60              
61             use HTML::Show;
62             use Chart::Plotly;
63             use Chart::Plotly::Trace::Scatter;
64             my $scatter = Chart::Plotly::Trace::Scatter->new( x => [ 1 .. 5 ], y => [ 1 .. 5 ] );
65            
66             HTML::Show::show( Chart::Plotly::render_full_html( data => [$scatter] ) );
67              
68             =head1 DESCRIPTION
69              
70             This attribute is part of the possible options for the trace scatter.
71              
72             This file has been autogenerated from the official plotly.js source.
73              
74             If you like Plotly, please support them: L<https://plot.ly/>
75             Open source announcement: L<https://plot.ly/javascript/open-source-announcement/>
76              
77             Full reference: L<https://plot.ly/javascript/reference/#scatter>
78              
79             =head1 DISCLAIMER
80              
81             This is an unofficial Plotly Perl module. Currently I'm not affiliated in any way with Plotly.
82             But I think plotly.js is a great library and I want to use it with perl.
83              
84             =head1 METHODS
85              
86             =head2 TO_JSON
87              
88             Serialize the trace to JSON. This method should be called only by L<JSON> serializer.
89              
90             =head1 ATTRIBUTES
91              
92             =over
93              
94             =item * marker
95              
96             =item * textfont
97              
98             =back
99              
100             =head1 AUTHOR
101              
102             Pablo Rodríguez González <pablo.rodriguez.gonzalez@gmail.com>
103              
104             =head1 COPYRIGHT AND LICENSE
105              
106             This software is Copyright (c) 2022 by Pablo Rodríguez González.
107              
108             This is free software, licensed under:
109              
110             The MIT (X11) License
111              
112             =cut