Terence Denzil Monteiro > Catalyst-View-PNGTTGraph-0.02 > Catalyst::View::PNGTTGraph

Download:
Catalyst-View-PNGTTGraph-0.02.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.02   Source  

NAME ^

Catalyst::View::PNGTTGraph - PNG Graph View Component for Catalyst

SYNOPSIS ^

in your View.

  package MyApp::View::PNGTTGraph;
  use base 'Catalyst::View::PNGTTGraph';

in your controller.

  sub pie_graph : Local {
      my @fields = qw(Jan Feb Mar);
      my @data_sales_02 = qw(12 45 21);

      $c->svgttg->create('Pie',
                         {'height' => '500',
                          'width' => '300',
                          'fields' => \@fields,
                         });
      $c->svgttg->graph_obj->add_data({
                                       'data' => \@data_sales_02,
                                       'title' => 'Sales 2002',
                                      });
  }

  sub end : Private {
      my ( $self, $c ) = @_;
      $c->forward($c->view('PNGTTGraph'));
  }

and see SVG::TT::Graph.

DESCRIPTION ^

Catalyst::View::PNGTTGraph is Catalyst PNG view handler of SVG::TT::Graph.

METHODS ^

new

this method makes method named $c->svgttg. $c->svgttg is an accessor to the object of Catalyst::View::SVGTTGraphObj. $c->svgttg uses $c->stash->{'Catalyst::View::SVGTTGraph'}.

process

create PNG Graph

SEE ALSO ^

Catalyst::View::SVGTTGraph, SVG::TT::Graph

AUTHORS ^

Terence Monteiro <terence@deeproot.co.in>

COPYRIGHT AND LICENSE ^

Copyright (c) by DeepRoot Linux Pvt Ltd. http://deeproot.co.in

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.