<div class="row-fluid">

	<div class="row-fluid">
		<div class="span12">
			<h4 style="text-align:center;">Orders per Restaurant by Community (last 14 days) - doesn't work</h4>
		</div>
	</div>

	<?
	$count = 1;
	foreach( $data as $group => $restaurants ){
		// $restaurants
		$info = '';
		foreach( $restaurants as $restaurant ){
			$info .= '["' . $restaurant['Restaurant'] . '",' . $restaurant['Orders'] . '],';
		}
	?>
	<div class="span12">
		<h5 style="text-align:center;"><?php echo $group; ?></h5>
	</div>
	<div id="chart-<?=$chartId?><?php echo $count; ?>" style="min-width: 100%; height:250px; margin: 0 auto"></div>
	<center style="height:60px;">
		<?php if( $subtitle != '' ){ ?>
			<div style="font-size:10px;"><?php echo $subtitle; ?></div>
		<?php } ?>
		<?php echo $description; ?>
</center>
	<br/>
	<br/>
	<br/>
	<script type="text/javascript">
	$(function () {
		var data = <?=json_encode($jsData, JSON_NUMERIC_CHECK)?>;
		$('#chart-<?=$chartId?><?php echo $count; ?>').highcharts({
					chart: {
							plotBackgroundColor: null,
							plotBorderWidth: null,
							plotShadow: false,
							backgroundColor:'rgba(255, 255, 255, 0.1)'
					},
					title: {
							text: ''
					},
					tooltip: {
						pointFormat: '{series.name}: <b>{point.y}</b> ({point.percentage:.1f}%)'
					},
					plotOptions: {
							pie: {
									allowPointSelect: true,
									cursor: 'pointer',
									dataLabels: {
											enabled: true,
											color: '#000000',
											connectorColor: '#000000',
											format: '<b>{point.name}</b>: {point.percentage:.1f} %'
									}
							}
					},
					series: [{
							type: 'pie',
							name: 'Orders',
							data: [<?php echo $info; ?>]
					}]
			});
	});
	</script>
	<?php
	$count++;
	}
	?>
</div>
</div>