Gene Boggs > GD-Graph-radar > GD::Graph::radar

Download:
GD-Graph-radar-0.1101.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.1101   Source  

NAME ^

GD::Graph::radar - Make radial bar charts

SYNOPSIS ^

  use GD::Graph::radar;
  my $radar = GD::Graph::radar->new(400, 400);
  my $image = $radar->plot([
      [qw( a    b  c    d    e    f    g  h    i )],
      [qw( 3.2  9  4.4  3.9  4.1  4.3  7  6.1  5 )]
  ]);
  print $image->png;  #or ->gif, or ->jpeg, or...

DESCRIPTION ^

This module is based on GD::Graph::pie with the exception of changes to the default settings, the draw_data method, and elimination of the pie specific code.

PUBLIC METHODS ^

new()

  $img = GD::Graph::radar->new();

Create a new GD::Graph::radar object.

plot()

Create the image.

PRIVATE METHODS ^

initialise()

Setup defaults.

set_label_font()

Set the font-name of the label.

set_value_font()

Set the font-name of the value.

setup_coords()

Setup the coordinate system and colours. Calculate the relative axis coordinates with respect to the canvas size.

setup_text()

Setup the parameters for the text elements.

draw_text()

Put the text on the canvas.

draw_data()

Draw the data lines and the polygon.

put_slice_label()

Put the slice label on the pie.

cartesian()

Return x, y coordinates, radius, angle, center x and y, and a scaling factor (height/width).

SEE ALSO ^

* The code in the eg/ and t/ directories.

GD::Graph

GD::Graph::pie for an example of a similar plotting API.

AUTHOR ^

Original code by Brad J. Murray <bjm@phreeow.net>

Maintenance by Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE ^

Copyright 2003 by Brad J. Murray

Copyright 2012 by Gene Boggs

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

syntax highlighting: