This page shows Perl code snippets using the URI::GoogleChart module to generate chart URLs and the corresponding images that the Google Chart service generate from them.
$u = URI::GoogleChart->new("pie-3d", 250, 100, data => [60, 40], chl => "Hello|World", );
$u = URI::GoogleChart->new("pie", 500, 150, data => [80, 20], color => ["yellow", "black"], chl => "Resembes Pack-man|Does not resemble Pac-man", chf => "bg,s,000000", chp => 0.6, margin => [0, 30, 10, 10], );
$u = URI::GoogleChart->new("lines", 200, 125, data => [40,60,60,45,47,75,70,72,], min => 0, max => 100, );
$u = URI::GoogleChart->new("sparklines", 200, 125, data => [27,25,60,31,25,39,25,31,26,28,80,28,27,31,27,29,26,35,70,25], min => 0, max => 100, );
$u = URI::GoogleChart->new("lxy", 200, 125, data => [ [10,20,40,80,90,95,99], [20,30,40,50,60,70,80], [undef], [5,25,45,65,85], ], color => [qw(3072F3 red)], );
$u = URI::GoogleChart->new("horizontal-stacked-bars", 200, 150, data => [ [10,50,60,80,40], [50,60,100,40,20], ], min => 0, max => 200, color => [qw(3072F3 f00)], );
$u = URI::GoogleChart->new("vertical-grouped-bars", 300, 125, data => [ [10,50,60,80,40], [50,60,100,40,20], ], min => 0, max => 100, chco => "3072F3,ff0000", );
$u = URI::GoogleChart->new("gom", 125, 80, data => 80, chl => 80, title => "Awsomness");
$u = URI::GoogleChart->new("usa", 200, 100);
$u = URI::GoogleChart->new("europe", 300, 150, color => ["white", "green", "red"], chf => "bg,s,EAF7FE", # water # nordic populations chld => "NOSEDKFIIS", data => [4.5e6, 9e6, 5.3e6, 5.1e6, 307261], );
Page generated with URI::GoogleChart v0.02