<?
global $vis_language;
$i=0;
$slaLevel = $slaDept = $slaLevelData = $slaDeptData = array();
foreach($report as $key=>$val)
{
	$temp = $temp1 = array();
	$temp[] = $temp1[] = $i;
	$temp[] = $val;
	$slaLevel[] = $temp; 
	$temp1[] = $key;
	$slaDept[] = $temp1; 
	$i++;
}
$slaLevelData = json_encode($slaLevel);
$slaDeptData = json_encode($slaDept);
$chart_area = "#department_statistics";
$yaxisLabel = $vis_language['TXTTICKETS'];
?>
<script>
	var domain = $('.domain_id option:selected').text();$('.otherSelected').val(domain);var durationID = $('#duration option:selected').val(); if(durationID == 4){var custom = $('#vis_department_report_from_date').val()+ " to " +$('#vis_department_report_to_date').val(); $('.durationSelected').val(custom);}else{var duration = $('#duration option:selected').text();$('.durationSelected').val(duration);}
</script>
<?
echo "<script>display_bar_chart('".$chart_area."',$slaDeptData,$slaLevelData,'".$yaxisLabel."');</script>";
?>
<div class="col-sm-12 portlet">
	<div class="panel-body">		
		<div id="department_statistics" style="height:300px">
		</div>
	</div>      
</div>
<input class="durationSelected" type="hidden">
<input class="otherSelected" type="hidden">		