The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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.