Chart/Plotly/Trace/Icicle/Outsidetextfont.pm untested

filter: Statementstmt 0.0% 0 / 37 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 8 MC/DCmcdc 0.0% 0 / 5 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 65 CC 5 SCAR 29.7
CC
5
Cov
0%
TO_JSON
30.0
BEGIN
2.0
BEGIN
2.0
CRAP 19.5
1 package Chart::Plotly::Trace::Icicle::Outsidetextfont;
2 use Moose;
3 use MooseX::ExtraArgs;
4 use Moose::Util::TypeConstraints qw(enum union);
5 if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) {
6 Moose::Util::TypeConstraints::type('PDL');
7 }
8  
9 our $VERSION = '0.042'; # VERSION
10  
11 # ABSTRACT: This attribute is one of the possible options for the trace icicle.
12  
13 sub TO_JSON {
14 my $self = shift;
15 my $extra_args = $self->extra_args // {};
16 my $meta = $self->meta;
17 my %hash = %$self;
18 for my $name ( sort keys %hash ) {
19 my $attr = $meta->get_attribute($name);
20 if ( defined $attr ) {
21 my $value = $hash{$name};
22 my $type = $attr->type_constraint;
23 if ( $type && $type->equals('Bool') ) {
24 $hash{$name} = $value ? \1 : \0;
25 }
26 }
27 }
28 %hash = ( %hash, %$extra_args );
29 delete $hash{'extra_args'};
30 if ( $self->can('type') && ( !defined $hash{'type'} ) ) {
31 $hash{type} = $self->type();
32 }
33 return \%hash;
34 }
35  
36 has color => ( is => "rw",
37 isa => "Str|ArrayRef[Str]", );
38  
39 has colorsrc => ( is => "rw",
40 isa => "Str",
41 documentation => "Sets the source reference on Chart Studio Cloud for `color`.",
42 );
43  
44 has description => (
45 is => "ro",
46 default =>
47 "Sets the font used for `textinfo` lying outside the sector. This option refers to the root of the hierarchy presented on top left corner of a treemap graph. Please note that if a hierarchy has multiple root nodes, this option won't have any effect and `insidetextfont` would be used.",
48 );
49  
50 has family => (
51 is => "rw",
52 isa => "Str|ArrayRef[Str]",
53 documentation =>
54 "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*.",
55 );
56  
57 has familysrc => ( is => "rw",
58 isa => "Str",
59 documentation => "Sets the source reference on Chart Studio Cloud for `family`.",
60 );
61  
62 has size => ( is => "rw",
63 isa => "Num|ArrayRef[Num]", );
64  
65 has sizesrc => ( is => "rw",
66 isa => "Str",
67 documentation => "Sets the source reference on Chart Studio Cloud for `size`.",
68 );
69  
70 __PACKAGE__->meta->make_immutable();
71 1;
72  
73 __END__