<? if($graphReport['tickLabel'] !=-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="labelChart">
		<div class="list-group no-radius no-border text-xs text-left pull-left" id="labelOps">					  
		   <? 
			$labelCount = $perCnt = $labelName = $lablColor = array();
			$total = 0;
			if(is_array($graphReport['tickLabel']))
			{
				foreach($graphReport['tickLabel'] as $label)
				{
					$labelCount[] = $label['labelCnt'];
					$labelName[] = $label['label_name'];
					$lablColor[] = $label['label_color'];
				}
				$labelRecs = json_encode($labelCount);
				$lablName  = json_encode($labelName);
				//$colors = $this->generateUniqueHexColors(count($labelCount)+5);
				$uniqueColorsPriority = json_encode(array_unique($lablColor));
				$opAreaPriority = "#labelOps";$chartAreaPriority = ".label_sparkline";
				echo "<script>display_pie_charts_data($labelRecs,$lablName,$uniqueColorsPriority,'".$opAreaPriority."','".$chartAreaPriority."');</script>";
			}
		?>
		</div>
		<div class="label_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">	
