Chart::OFC2::Pie - OFC2 Pie chart
use Chart::OFC2::Pie; my $pie = Chart::OFC2::Pie->new( tip => '#val# of #total#<br>#percent# of 100%', ); $pie->values([ (1 .. 5) ]); $pie->values->labels([qw( IE Firefox Opera Wii Other)]); $pie->values->colours([ '#d01f3c', '#356aa0', '#C79810', '#73880A', '#D15600' ]); my $pie2 = Chart::OFC2::Pie->new( values => [ { 'value' => 1, 'label' => 'IE', }, { 'value' => 2, 'label' => 'Firefox', }, ], ); my $pie2 = Chart::OFC2::Pie->new( values => [ { 'value' => 1, 'label' => 'IE', 'colour' => '#d01f3c' }, { 'value' => 2, 'label' => 'Firefox', 'colour' => '#356aa0' }, { 'value' => 3, 'label' => 'Opera', 'colour' => '#C79810' }, { 'value' => 4, 'label' => 'Wii', 'colour' => '#000000' }, { 'value' => 5, 'label' => 'Other', 'colour' => '#D15600' }, ], );
use base 'Chart::OFC2::Element';
Jozef Kutej
To install Chart::OFC2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Chart::OFC2
CPAN shell
perl -MCPAN -e shell install Chart::OFC2
For more information on module installation, please visit the detailed CPAN module installation guide.