my $chart = $workbook1->add_chart( type => 'column', embedded => 1 );
$chart->set_size( width => 1000, height => 500 );
#my $col = 'B';
$col2 = 0;
for my $app (sort keys %app){
++$col2;
# $chart->add_series(
# name => $app,
# categories => ['Summary',1,$row2,0,0],
# values => ['Summary',1,$row2,$col2,$col2]
# );
$chart->add_series(
categories => '=(Data!$D$1:$D$9,Data!$D$14:$D$25)',
values => '=(Data!$E$1:$E$9,Data!$E$14:$E$25)',
);
}
$chart->set_title ( name => 'Results of sample analysis' );
$chart->set_x_axis( name => 'Device/Browser' );
$chart->set_y_axis( name => 'User Count' );
# add chart
$worksheet2->insert_chart( 26, 1 , $chart);
$row2 = 48;
$col2 = 4;
my $width = 3;
for my $device (@device){
my $text = $workbook1->add_shape( type => 'rect', text => $device, l
+ine=>1, bold => 1 );
$worksheet2->insert_shape( $row2, $col2, $text );
$col2 += $width;
}
$workbook1->close();
|