| Chart-Clicker documentation | Contained in the Chart-Clicker distribution. |
Chart::Clicker::Decoration::Plot - Area on which renderers draw
A Component that handles the rendering of data via Renderers. Also handles rendering the markers that come from the Clicker object.
Set/Get this Plot's background color.
Set/Get this Plot's border.
Set/Get this Plot's clicker instance.
Set/Get the flag that determines if markers are drawn on this plot.
Creates a new Plot object.
Draw this Plot
Set/Get the Grid component used on this plot.
Set/Get this Plot's layout. See Layout::Manager.
Prepare this Plot by determining how much space it needs.
Cory G Watson <gphat@cpan.org>
perl(1)
You can redistribute and/or modify this code under the same terms as Perl itself.
| Chart-Clicker documentation | Contained in the Chart-Clicker distribution. |
package Chart::Clicker::Decoration::Plot; use Moose; use Layout::Manager::Axis; use Layout::Manager::Single; use Chart::Clicker::Decoration::Grid; # TODO READD THIS #use Chart::Clicker::Decoration::MarkerOverlay; # TODO MOve this class? It's not decoration anymore. extends 'Chart::Clicker::Container'; has 'clicker' => ( is => 'rw', isa => 'Chart::Clicker', ); has 'grid' => ( is => 'rw', isa => 'Chart::Clicker::Decoration::Grid', default => sub { Chart::Clicker::Decoration::Grid->new( name => 'grid' ) } ); has '+layout_manager' => ( default => sub { Layout::Manager::Axis->new } ); has 'render_area' => ( is => 'rw', isa => 'Chart::Clicker::Container', default => sub { Chart::Clicker::Container->new( name => 'render_area', layout_manager => Layout::Manager::Single->new ) } ); override('prepare', sub { my ($self) = @_; # TODO This is also happening in Clicker.pm foreach my $c (@{ $self->components }) { $c->clicker($self->clicker); } # TODO This is kinda messy... foreach my $c (@{ $self->render_area->components }) { $c->clicker($self->clicker); } super; }); __PACKAGE__->meta->make_immutable; no Moose; 1; __END__