|
Posted by DJB on November 15, 2006, 4:29 pm
Please log in for more thread options
Hi all,
Perl 5.8.4
SVG-TT-Graph-0.09
Windows XP / Solaris 10
I've had good success with SVG::TT::Graph::Pie. However, I've noticed
that if I have more than one small pie slice, the data labels become
too crowded. Is there a way to create "spokes" of some sort that let
me set the data labels just outside of the image itself, with a line to
the appropriate pie slice?
Here's some sample code to demonstrate what I mean. You'll notice that
the 'Dual SVC' labels all kind of blend into each other.
use strict;
use SVG::TT::Graph::Pie;
my @fields = (
'Install', 'Change', 'Disconnect', 'T', 'F', 'Dual SVC',
'Dual SVC Install', 'Dual SVC Disconnect'
);
my @data = qw/
26264 12193 13606 4161 2638 1004 997 794
/;
my $graph = SVG::TT::Graph::Pie->new({
fields => \@fields,
show_data_labels => 1,
graph_title => 'Integrator',
show_graph_title => 1,
key => 1,
key_placement => 'B',
});
$graph->add_data({
'data' => \@data,
'title' => 'Count',
});
open(FH, ">test.svg") or die "Unable to open file: $!\n";
print FH $graph->burn();
close(FH);
If this isn't possible atm, consider this a feature request. :)
I would submit a patch, but I'm afraid my SVG skills are woefully
inadequate.
Regards,
Dan
|
| Similar Threads | Posted | | GD::Graph - how to get rid of leading gap in line graph? | October 1, 2004, 10:56 am |
| Graph.0.69 Module---how to get a DAG from graph with cycles | January 23, 2006, 2:50 pm |
| Creating Calendar?? | October 6, 2004, 12:37 am |
| Creating Thumbnails | May 22, 2005, 5:18 pm |
| Question about creating modules | May 27, 2006, 4:50 pm |
| Perl:CGI - Creating a Please wait message | February 16, 2007, 11:13 am |
| Creating FULLTEXT index OK on command line, but NOT with DBI...? | March 12, 2005, 6:24 am |
| SOAP::Lite creating remote objects | March 29, 2006, 9:51 am |
| Creating Makefiles for multiple nested modules | June 8, 2006, 3:33 pm |
| Problem creating envelope-from in module Email::Send | July 16, 2007, 7:33 am |
|