File Coverage

blib/lib/Chart/Plotly/Trace/Scatter/Marker/Colorbar/Title/Font.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   29 use MooseX::ExtraArgs;
  5         11  
  5         30  
3 5     5   25979 use Moose::Util::TypeConstraints qw(enum union);
  5         17  
  5         34  
4 5     5   8799 if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) {
  5         14  
  5         36  
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 => (
38             is => "ro",
39             default =>
40             "Sets this color bar's title font. Note that the title's font used to be set by the now deprecated `titlefont` attribute.",
41             );
42              
43             has family => (
44             is => "rw",
45             isa => "Str",
46             documentation =>
47             "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*.",
48             );
49              
50             has size => ( is => "rw",
51             isa => "Num", );
52              
53             __PACKAGE__->meta->make_immutable();
54             1;
55              
56              
57             =pod
58              
59             =encoding utf-8
60              
61             =head1 NAME
62              
63             Chart::Plotly::Trace::Scatter::Marker::Colorbar::Title::Font - This attribute is one of the possible options for the trace scatter.
64              
65             =head1 VERSION
66              
67             version 0.042
68              
69             =head1 SYNOPSIS
70              
71             use HTML::Show;
72             use Chart::Plotly;
73             use Chart::Plotly::Trace::Scatter;
74             my $scatter = Chart::Plotly::Trace::Scatter->new( x => [ 1 .. 5 ], y => [ 1 .. 5 ] );
75            
76             HTML::Show::show( Chart::Plotly::render_full_html( data => [$scatter] ) );
77              
78             =head1 DESCRIPTION
79              
80             This attribute is part of the possible options for the trace scatter.
81              
82             This file has been autogenerated from the official plotly.js source.
83              
84             If you like Plotly, please support them: L<https://plot.ly/>
85             Open source announcement: L<https://plot.ly/javascript/open-source-announcement/>
86              
87             Full reference: L<https://plot.ly/javascript/reference/#scatter>
88              
89             =head1 DISCLAIMER
90              
91             This is an unofficial Plotly Perl module. Currently I'm not affiliated in any way with Plotly.
92             But I think plotly.js is a great library and I want to use it with perl.
93              
94             =head1 METHODS
95              
96             =head2 TO_JSON
97              
98             Serialize the trace to JSON. This method should be called only by L<JSON> serializer.
99              
100             =head1 ATTRIBUTES
101              
102             =over
103              
104             =item * color
105              
106             =item * description
107              
108             =item * family
109              
110             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*.
111              
112             =item * size
113              
114             =back
115              
116             =head1 AUTHOR
117              
118             Pablo Rodríguez González <pablo.rodriguez.gonzalez@gmail.com>
119              
120             =head1 COPYRIGHT AND LICENSE
121              
122             This software is Copyright (c) 2022 by Pablo Rodríguez González.
123              
124             This is free software, licensed under:
125              
126             The MIT (X11) License
127              
128             =cut