GDGraph
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
# Module to create graphs from a data set drawing on a GD::Image
# object
#
# Package of a number of graph types:
# GD::Graph::bars
# GD::Graph::hbars
# GD::Graph::lines
# GD::Graph::points
# GD::Graph::linespoints
# GD::Graph::area
# GD::Graph::pie
# GD::Graph::mixed
#
# $Id: Graph.pm,v 1.55 2007/04/26 04:12:47 ben Exp $
#
#==========================================================================
#
# GD::Graph
#
# Parent class containing data all graphs have in common.
samples/sample92.pl view on Meta::CPAN
use GD::Graph::pie;
require 'save.pl';
print STDERR "Processing sample92\n";
@data = (
["1st","2nd","3rd","4th","5th","6th"],
[ 4, 2, 3, 4, 3, 3.5]
);
$my_graph = new GD::Graph::pie( 250, 200 );
$my_graph->set(
title => 'A Pie Chart',
label => 'Label',
axislabelclr => 'white',
dclrs => [ 'lblue' ],
accentclr => 'lgray',
transparent => 0,
);
samples/sample93.pl view on Meta::CPAN
use GD::Graph::pie;
require 'save.pl';
print STDERR "Processing sample93\n";
@data = (
[ qw( 1st 2nd 3rd 4th 5th 6th 7th ) ],
[ sort { $b <=> $a} (5.6, 2.1, 3.03, 4.05, 1.34, 0.2, 2.56) ]
);
$my_graph = new GD::Graph::pie( 200, 200 );
$my_graph->set(
start_angle => 90,
'3d' => 0,
label => 'Foo Bar',
# The following should prevent the 7th slice from getting a label
suppress_angle => 5,
transparent => 0,
);
samples/sample94.pl view on Meta::CPAN
use GD::Graph::pie;
use strict;
require 'save.pl';
# Test for very large slices that wrap around, and for text that
# is larger than the pie boundaries
print STDERR "Processing sample94\n";
my @data = (
["Oversized label", "label", undef],
[3, 2.5, 23]
);
my $my_graph = new GD::Graph::pie( 250, 200 );
$my_graph->set(
title => 'A Pie Chart',
label => 'Label',
axislabelclr => 'black',
pie_height => 36,
l_margin => 10,
r_margin => 10,
# approximate boundary conditions for start_angle
#start_angle => -85,
use GD::Graph::hbars;
ok(1);
use GD::Graph::lines;
ok(1);
use GD::Graph::points;
ok(1);
use GD::Graph::linespoints;
ok(1);
use GD::Graph::mixed;
ok(1);
use GD::Graph::pie;
ok(1);
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.614 second using v1.00-cache-2.02-grep-82fe00e-cpan-1925d2aa809 )