I think Google chart may want JSON formatted data, so do have a look at the Perl JSON module. Its simple and fast. Otherwise you will be re-inventing wheels. Before that of course, you will need your data in something like the correct format. I guess you need an array of arrays...
# untested code use strict; use warnings; use Data::Dumper; use JSON; # read up on this, it may be a great help my $json = JSON->new->allow_nonref; my %elohimHash; # Not sure where this comes from, but obviously it mus +t be defined by here... my @ValsArray; for my $folderId (keys %elohimHash){ for my $customer (keys %{$elohimHash{$folderId}}){ for my $version (keys %{$elohimHash{$folderId}{$customer}}){ my $totSP = $elohimHash{$folderId}{$customer}{$version}{totSP +}; push @valsArray, [$version,$totSP]; } } } print Dumper \@ValsArray; print "-" x 30; print "\n"; print $json->encode(\@ValsArray);
Cheers,
R.
In reply to Re: Filling a matrix
by Random_Walk
in thread Filling a matrix
by David92
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |