open ($outfile, ">", $dir.$filename)||die "Couldnt open the file!\n"; (@outputHead) = createHeader($outfile,$filename); print $outfile " @outputHead\n"; print $outfile " [@legendArrayBAR],\n"; for($j=0; $j<$rows;$j++){ print $outfile "['$valueMatrixBAR[$j][0]',"; for($i=0; $i<$cols-1;$i++){ print $outfile " $valueMatrixBAR[$j][$i+1],"; if($loop_count == $cols-2){ $line =~ s/,+$//; } $loop_count++; } print $outfile "],\n"; } print $outfile " ]); var options = { 'width': 800, 'height': 400, title: '$title', hAxis: {title: 'Sprint', titleTextStyle: {color: 'red'}} };\n var chart = new google.visualization.ColumnChart(document.getElementById('chart_div')); chart.draw(data, options); }\n"; (@outputFoot) =createFooter($outfile,\@CustomerList,\@SprintList,$filename); print $outfile "@outputFoot\n"; #print "Finished writting a file\n"; close ($outfile);