The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

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, terencemo@cpan.org

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.