NAME
Chart::Gnuplot::Pie - Plot pie chart using Gnuplot on the fly
SYNOPSIS
use Chart::Gnuplot::Pie;
# Create the pie chart object
my $chart = Chart::Gnuplot::Pie->new(
output => "pie.png",
title => "Sample Pie",
....
);
# Data set
my $dataSet = Chart::Gnuplot::Pie::DataSet->new(
data => [
['Item 1', 7500],
['Item 2', 3500],
['Item 3', 2000],
['Item 4', 4500],
],
....
);
# Plot a 2D pie chart
$chart->plot2d($dataSet);
#################################################
# Plot a 3D pie chart
$chart->plot3d($dataSet);
DESCRIPTION
This module provides an interface for plotting pie charts using Gnuplot, which does not have built-in command for pie chart. This module requires Gnuplot and Chart::Gnuplot
.
Chart::Gnuplot::Pie
is a child class of Chart::Gnuplot
. As a result, what you may do on a Chart::Gnuplot
object basically works on a Chart::Gnuplot::Pie
object too, with a few exceptions. Similarly, Chart::Gnuplot::Pie::DataSet
is a child class of Chart::Gnuplot::DataSet
.
IMPORTANT: This module is a preliminary version. Not many pie charting options are provided currently. Besides, backward compatibility may not be guaranteed in later versions.
REQUIREMENT
Gnuplot http://www.gnuplot.info
ImageMagick http://www.imagemagick.org (for full feature)
SEE ALSO
Gnuplot tricks: http://gnuplot-tricks.blogspot.com
AUTHOR
Ka-Wai Mak <kwmak@cpan.org>
COPYRIGHT
Copyright (c) 2009, 2011 Ka-Wai Mak. All rights reserved.
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.