Chart-Plotly
view release on metacpan or search on metacpan
lib/Chart/Plotly/Trace/Bar/Legendgrouptitle/Font.pm view on Meta::CPAN
package Chart::Plotly::Trace::Bar::Legendgrouptitle::Font;
use Moose;
use MooseX::ExtraArgs;
use Moose::Util::TypeConstraints qw(enum union);
if ( !defined Moose::Util::TypeConstraints::find_type_constraint('PDL') ) {
Moose::Util::TypeConstraints::type('PDL');
}
our $VERSION = '0.042'; # VERSION
# ABSTRACT: This attribute is one of the possible options for the trace bar.
sub TO_JSON {
my $self = shift;
my $extra_args = $self->extra_args // {};
my $meta = $self->meta;
my %hash = %$self;
for my $name ( sort keys %hash ) {
my $attr = $meta->get_attribute($name);
if ( defined $attr ) {
my $value = $hash{$name};
my $type = $attr->type_constraint;
if ( $type && $type->equals('Bool') ) {
$hash{$name} = $value ? \1 : \0;
}
}
}
%hash = ( %hash, %$extra_args );
delete $hash{'extra_args'};
if ( $self->can('type') && ( !defined $hash{'type'} ) ) {
$hash{type} = $self->type();
}
return \%hash;
}
has color => ( is => "rw",
isa => "Str", );
has description => ( is => "ro",
default => "Sets this legend group's title font.", );
has family => (
is => "rw",
isa => "Str",
documentation =>
"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...
);
has size => ( is => "rw",
isa => "Num", );
__PACKAGE__->meta->make_immutable();
1;
__END__
=pod
=encoding utf-8
=head1 NAME
Chart::Plotly::Trace::Bar::Legendgrouptitle::Font - This attribute is one of the possible options for the trace bar.
=head1 VERSION
version 0.042
=head1 SYNOPSIS
use Chart::Plotly;
use Chart::Plotly::Trace::Bar;
use Chart::Plotly::Plot;
my $x = [ "apples", "bananas", "cherries" ];
my $sample1 = Chart::Plotly::Trace::Bar->new( x => $x,
y => [ map { int( rand() * 10 ) } ( 1 .. ( scalar(@$x) ) ) ],
name => "sample1"
);
my $sample2 = Chart::Plotly::Trace::Bar->new( x => $x,
y => [ map { int( rand() * 10 ) } ( 1 .. ( scalar(@$x) ) ) ],
name => "sample2"
);
my $sample3 = Chart::Plotly::Trace::Bar->new( x => $x,
y => [ map { int( rand() * 10 ) } ( 1 .. ( scalar(@$x) ) ) ],
name => "sample3"
);
my $plot = Chart::Plotly::Plot->new( traces => [ $sample1, $sample2, $sample3 ], layout => { barmode => 'group' } );
Chart::Plotly::show_plot($plot);
=head1 DESCRIPTION
This attribute is part of the possible options for the trace bar.
This file has been autogenerated from the official plotly.js source.
If you like Plotly, please support them: L<https://plot.ly/>
Open source announcement: L<https://plot.ly/javascript/open-source-announcement/>
Full reference: L<https://plot.ly/javascript/reference/#bar>
( run in 1.191 second using v1.01-cache-2.11-cpan-39bf76dae61 )