<?
global $vis_language;
$i=0;
$slaLevel = $slaChannel = $slaLevelData = $slaChannelData = array(); 
foreach($report as $key=>$val)
{
	$temp = $temp1 = array();
	$temp[] = $temp1[] = $i;
	$temp[] = $val;
	$slaLevel[] = $temp; 
	$temp1[] = $key;
	$slaChannel[] = $temp1; 
	$i++;
} 
$slaLevelData = json_encode($slaLevel);
$slaChannelData = json_encode($slaChannel);
$chart_area = "#channel_report";
$yaxisLabel = $vis_language['TXTTICKETS'];
?>
<script>
var domain = $('#department_id option:selected').text();$('.otherSelected').val(domain);
var durationID = $('#duration option:selected').val(); if(durationID == 4){var custom = $('#vis_channel_report_from_date').val()+ " to " +$('#vis_channel_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."',$slaChannelData,$slaLevelData,'".$yaxisLabel."');</script>";
?>
<div class="col-sm-12 portlet text-muted "  >
	<div class="panel-body">		
		<div id="channel_report" style="height:300px">
		</div>
	</div>      
</div>
<input class="durationSelected" type="hidden">
<input class="otherSelected" type="hidden">	