Danny,

Attached is a sample file and here is the code, pretty straight forward.


Regards


Keith

---------------------------
my %tech_list = loadCSV($config{Technology_Table},$config{Technology_Key});
my @data;
my @d1;
my @d2;
my @d3;
my $i = 0;
my $max = 0;
foreach my $key ( sort (keys %tech_list) ) {
        if  ($tech_list{$key}{type} eq "Technology" ) {
                if ( $max < $tech_list{$key}{count} ) {
                        $max = $tech_list{$key}{count};
                }
                $d1[$i] = "$tech_list{$key}{technology}";
                $d2[$i] = $tech_list{$key}{count};
                ++$i;
        }
}
@data = ( [EMAIL PROTECTED], [EMAIL PROTECTED] );

my $graph = GD::Graph::pie3d->new(640, 480);
$graph->set(
        x_label           => 'Technology',
        y_label           => 'Node Count',
        #title             => 'Technology Profile',
        x_labels_vertical => 1,
        y_max_value       => $max,
        y_tick_number     => 8,
        y_label_skip      => 2
);
my $gd = $graph->plot([EMAIL PROTECTED]);
open(IMG, ">$config{tech_image}") or die "ERROR with $config{tech_image}.
$!\n";
binmode IMG;
print IMG $gd->png;
close IMG;

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Danny
> Bendersky
> Sent: Wednesday, March 06, 2002 5:21 AM
> To: [EMAIL PROTECTED]; Torleiv Ringer
> Cc: [EMAIL PROTECTED]
> Subject: [rrd-developers] Re: PIE CHART ???
>
>
>
> That will be great! can you please send me that, and if you have some
> examples will be great too.
>
> Thanks!
>
>
> On 6/3/02 4:25 AM, "Keith Sinclair" <[EMAIL PROTECTED]> wrote:
>
> > You could do an RRD Fetch then use GD::Graph and GD::Graph3d to
> do the pie
> > chart.  I have some code handy if you like.
> >
> >
> > Regards
> >
> >
> > Keith
> >
>
>
> --
> Unsubscribe
mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi


-- Attached file removed by Listar and put at URL below --
-- Type: image/png
-- Size: 10k (10692 bytes)
-- URL : http://www.ee.ethz.ch/~slist/pantomime/tech.png


--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-developers
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to