Chart::OFC::Pie - A pie chart
version 0.12
my $dataset = Chart::OFC::Dataset->new( values => [ 1 .. 5 ] ); my $pie = Chart::OFC::Pie->new( title => 'My Pie Chart', dataset => $dataset, );
This class represents a pie chart. A pie chart displays a single dataset as a set of pie slices.
This class is a subclass of Chart::OFC and accepts all of that class's attribute. It has several attributes of its own which may be passed to the new() method.
Chart::OFC
new()
This should be a single dataset of the Chart::OFC::Dataset class. (It could be any Dataset subclass, but all the subclass's attributes will be ignored).
Chart::OFC::Dataset
This attribute is required.
This should an array of colors. If you give fewer colors than there are in your dataset then colors will be reused (in order).
This defaults to "red, blue, green, yellow, orange, purple, black".
The colors of the lines which define slices.
Defaults to #000000 (black).
This should be an array reference containing one or more labels for the slices. This should contain one label per valuable in the dataset.
A snippet of CSS that will be applied to the labels. The default is "color: #000000". If you change this you should probably make sure to include a color.
This defines how opaque the slices are. When they are moused over, they become fully opaque.
Defaults to 80 (percent).
This class does the Chart::OFC::Role::OFCDataLines role.
Chart::OFC::Role::OFCDataLines
Dave Rolsky <autarch@urth.org>
This software is Copyright (c) 2014 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Chart::OFC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chart::OFC
CPAN shell
perl -MCPAN -e shell install Chart::OFC
For more information on module installation, please visit the detailed CPAN module installation guide.