From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

# ABSTRACT: Basic types for theme elements
use strict;
our $VERSION = '0.0002_01'; # TRIAL VERSION
use Function::Parameters qw(classmethod);
sub transform_key {
my ( $class, $key ) = @_;
return 'color' if $key eq 'colour';
return $key;
}
sub parameters { [] }
sub is_blank { false }
method string () {
return Dumper($self);
}
}
use Function::Parameters qw(classmethod);
classmethod parameters () { [] }
sub is_blank { true }
}
use Function::Parameters qw(classmethod);
around parameters => sub {
my $orig = shift;
my $class = shift;
return [
qw(color size linetype lineend inherit_blank),
@{ $class->$orig() }
];
};
}
use Function::Parameters qw(classmethod);
use Chart::GGPlot::Util qw(pt);
around parameters => sub {
my $orig = shift;
my $class = shift;
return [ qw(fill color size linetype inherit_blank),
@{ $class->$orig() } ];
}
}
use Function::Parameters qw(classmethod);
our $VERSION = '0.0002_01'; # TRIAL VERSION
around parameters => sub {
my $orig = shift;
my $class = shift;
return [
qw(
family face color size hjust vjust
angle lineheight inherit_blank
),
@{ $class->$orig() }
];
};
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Chart::GGPlot::Theme::Element - Basic types for theme elements
=head1 VERSION
version 0.0002_01
=head1 SEE ALSO
L<Chart::GGPlot::Theme::Element>
1;
__END__
=head1 AUTHOR
Stephan Loyd <sloyd@cpan.org>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2019 by Stephan Loyd.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut