File Coverage

blib/lib/Chart/Plotly/Trace/Scatter/Marker/Colorbar/Tickfont.pm
Criterion Covered Total %
statement 9 25 36.0
branch 0 8 0.0
condition 0 8 0.0
subroutine 3 4 75.0
pod 1 1 100.0
total 13 46 28.2


line stmt bran cond sub pod time code
1             use Moose;
2 5     5   27 use MooseX::ExtraArgs;
  5         9  
  5         24  
3 5     5   25202 use Moose::Util::TypeConstraints qw(enum union);
  5         14  
  5         25  
4 5     5   8237 if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) {
  5         10  
  5         34  
5             Moose::Util::TypeConstraints::type('PDL');
6             }
7              
8             our $VERSION = '0.042'; # VERSION
9              
10             # ABSTRACT: This attribute is one of the possible options for the trace scatter.
11              
12             my $self = shift;
13             my $extra_args = $self->extra_args // {};
14 0     0 1   my $meta = $self->meta;
15 0   0       my %hash = %$self;
16 0           for my $name ( sort keys %hash ) {
17 0           my $attr = $meta->get_attribute($name);
18 0           if ( defined $attr ) {
19 0           my $value = $hash{$name};
20 0 0         my $type = $attr->type_constraint;
21 0           if ( $type && $type->equals('Bool') ) {
22 0           $hash{$name} = $value ? \1 : \0;
23 0 0 0       }
24 0 0         }
25             }
26             %hash = ( %hash, %$extra_args );
27             delete $hash{'extra_args'};
28 0           if ( $self->can('type') && ( !defined $hash{'type'} ) ) {
29 0           $hash{type} = $self->type();
30 0 0 0       }
31 0           return \%hash;
32             }
33 0            
34             has color => ( is => "rw",
35             isa => "Str", );
36              
37             has description => ( is => "ro",
38             default => "Sets the color bar's tick label font", );
39              
40             has family => (
41             is => "rw",
42             isa => "Str",
43             documentation =>
44             "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.",
45             );
46              
47             has size => ( is => "rw",
48             isa => "Num", );
49              
50             __PACKAGE__->meta->make_immutable();
51             1;
52              
53              
54             =pod
55              
56             =encoding utf-8
57              
58             =head1 NAME
59              
60             Chart::Plotly::Trace::Scatter::Marker::Colorbar::Tickfont - This attribute is one of the possible options for the trace scatter.
61              
62             =head1 VERSION
63              
64             version 0.042
65              
66             =head1 SYNOPSIS
67              
68             use HTML::Show;
69             use Chart::Plotly;
70             use Chart::Plotly::Trace::Scatter;
71             my $scatter = Chart::Plotly::Trace::Scatter->new( x => [ 1 .. 5 ], y => [ 1 .. 5 ] );
72            
73             HTML::Show::show( Chart::Plotly::render_full_html( data => [$scatter] ) );
74              
75             =head1 DESCRIPTION
76              
77             This attribute is part of the possible options for the trace scatter.
78              
79             This file has been autogenerated from the official plotly.js source.
80              
81             If you like Plotly, please support them: L<https://plot.ly/>
82             Open source announcement: L<https://plot.ly/javascript/open-source-announcement/>
83              
84             Full reference: L<https://plot.ly/javascript/reference/#scatter>
85              
86             =head1 DISCLAIMER
87              
88             This is an unofficial Plotly Perl module. Currently I'm not affiliated in any way with Plotly.
89             But I think plotly.js is a great library and I want to use it with perl.
90              
91             =head1 METHODS
92              
93             =head2 TO_JSON
94              
95             Serialize the trace to JSON. This method should be called only by L<JSON> serializer.
96              
97             =head1 ATTRIBUTES
98              
99             =over
100              
101             =item * color
102              
103             =item * description
104              
105             =item * family
106              
107             HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The Chart Studio Cloud (at https://chart-studio.plotly.com or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.
108              
109             =item * size
110              
111             =back
112              
113             =head1 AUTHOR
114              
115             Pablo Rodríguez González <pablo.rodriguez.gonzalez@gmail.com>
116              
117             =head1 COPYRIGHT AND LICENSE
118              
119             This software is Copyright (c) 2022 by Pablo Rodríguez González.
120              
121             This is free software, licensed under:
122              
123             The MIT (X11) License
124              
125             =cut