Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Jifty::Plugin::Chart::Renderer
Base class for chart rendering classes

Jifty::Plugin::Chart::Renderer - Base class for chart rendering classes


NAME

Jifty::Plugin::Chart::Renderer - Base class for chart rendering classes


SYNOPSIS

In your config.yml:


  Plugins:

    - Chart:

        renderer: MyApp::Renderer;

In lib/MyApp/Renderer.pm:


  package MyApp::Renderer;

  use base qw/ Jifty::Plugin::Chart::Renderer /;

  sub init {

      my $self = shift;

      # Handle any required initialization, like required CSS, JS, etc.

  }

  sub render {

      my $self = shift;

      my %args = @_;

      # Output your chart

      Jifty->web->out( #{ Output your chart here... } );

      # You could also return it as a string...

      return;

  }


METHODS

Your renderer implementation must subclass this package and implement the following methods:

new

This is the constructor. Don't override this directly. Instead implement init.

init


  $renderer->init();

This is called by new immediately after constructing the object. It is passed a param hash from the config file. Subclasses should implement this method to do any required initialization such as letting Jifty know about required CSS files, JS files, etc.

render


  Jifty->web->out($renderer->render(%args));

See the Jifty::Plugin::Chart::Web manpage for the arguments. It must (at least) accept the arguments given to the chart in the Jifty::Plugin::Chart::Web manpage method.

The render method may either return it's output or print it out using the Jifty::Web::out manpage.


SEE ALSO

the Jifty::Plugin::Chart::Web manpage, the Jifty::Plugin::Chart::Renderer::Chart manpage


AUTHOR

Andrew Sterling Hanenkamp <andrew.hanenkamp@boomer.com>


COPYRIGHT AND LICENSE

Copyright 2007 Boomer Consulting, Inc.

This is free software and may be modified and distributed under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy