SVGGraph-Pie

 view release on metacpan or  search on metacpan

lib/SVGGraph/Pie.pm  view on Meta::CPAN

    }

    ## Title
    if ($$options{title}) {
	my $titlestyle = 'font-size:24;';
	$titlestyle = $$options{titlestyle} if $$options{titlestyle};
	$svg->text(
	    'x' => 20,
	    'y' => 40,
	    'style' => $titlestyle,
	)->cdata($$options{title});
    }

    ## Label
    if ($$options{label}) {
	my $labelleft = $cx + $radius + 10;
	$labelleft = $$options{labelleft} if $$options{labelleft};
	$start = $cy - $radius;
	$start = $$options{labeltop} if $$options{labeltop};

	for (my $i = 0; $i < @$values; $i++) {

lib/SVGGraph/Pie.pm  view on Meta::CPAN

		'rx' => 5,
		'ry' => 5,
		'style' => {
		    fill => $labelcolors[$i],
		    stroke => 'black',
		},
	    );
	    $svg->text(
		'x' => $labelleft + 25,
		'y' => $start + GAP,
	    )->cdata($values->[$i]->{label});

	    $start += 25;
	}
    }

    return $svg->xmlify;
}

## private method
sub _round {



( run in 0.574 second using v1.01-cache-2.11-cpan-454fe037f31 )