<? if($graphReport['tickStatus'] !=-1): ?> 
<script>
	var dept = $('#department_id option:selected').text();$('.otherSelected').val(dept);
	var durationID = $('#duration option:selected').val(); if(durationID == 4){var custom = $('#vis_graphical_report_from_date').val()+ " to " +$('#vis_graphical_report_to_date').val(); $('.durationSelected').val(custom);}else{var duration = $('#duration option:selected').text();$('.durationSelected').val(duration);}
</script>
<div class="col-sm-6 portlet">
	<div class="panel-body text-center" id="statusChart">
		<div class="list-group no-radius no-border text-xs text-left pull-left" id="statusOps">					  
		   <? 
			$statusCount = $perCnt = $statusName = array();
			$total = 0;
				if(is_array($graphReport['tickStatus']))
				{
					foreach($graphReport['tickStatus'] as $status)
					{
						$statusCount[] = $status['statusCnt'];
						$statusName[] = $status['status_name'];
					}
					$statusRecs = json_encode($statusCount);
					$statName = json_encode($statusName);
					$colors = $this->generateUniqueHexColors(count($statusCount)+5);
					$uniqueColorsPriority = json_encode(array_unique($colors));
					$opAreaPriority = "#statusOps";$chartAreaPriority = ".status_sparkline";
					echo "<script>display_pie_charts_data($statusRecs,$statName,$uniqueColorsPriority,'".$opAreaPriority."','".$chartAreaPriority."');</script>";
				}
		?>
		</div>
		<div class="status_sparkline" style="height:180px"></div>
	</div>
</div>  
<? else: echo '<script> $("#pdfGraphExport").hide();</script>'?>
<? include(VIS_PATH_TEMPLATE.'no_record_yet.php');  ?>
<? endif; ?>	
<input class="durationSelected" type="hidden">
<input class="otherSelected" type="hidden">	
