Вам нужно выполнить итерацию по вашему массиву и создать диаграмму на основе данных каждого подмассива, как показано ниже: -
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.9/jquery.jqplot.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.9/plugins/jqplot.pointLabels.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.9/plugins/jqplot.barRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.9/plugins/jqplot.dateAxisRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.9/plugins/jqplot.categoryAxisRenderer.min.js"></script>
<script language="javascript" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.9/plugins/jqplot.enhancedPieLegendRenderer.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jqPlot/1.0.9/jquery.jqplot.min.css" />
<?php
$array = array(
0 => array(
0 => array(
2, 6, 7, 10,2, 6, 7, 10,2, 6, 7, 10
)
),
1 => array(
0 => array(
7, 5, 3, 2,7, 5, 3, 2,7, 5, 3, 22
)
),
2 => array(
0 => array(
14, 9, 3, 8,14, 9, 3, 8,14, 9, 3, 8
)
),3 => array(
0 => array(
15, 8, 2, 10,15, 8, 2, 10,15, 8, 2, 10,
)
),4 => array(
0 => array(
12, 18, 2, 0,1, 8, 2, 7,6, 8, 2, 21,
)
)
);
foreach($array as $key=> $arr){?>
<div id="chart<?php echo $key;?>"></div>
<script type="text/javascript">
$(document).ready(function(){
plot3 = $.jqplot('chart<?php echo $key;?>', <?php echo json_encode($arr); ?>, {
stackSeries: true,
captureRightClick: true,
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions: {
highlightMouseDown: true
},
pointLabels: {show: true}
},
legend: {
show: true,
location: 'e',
placement: 'outside'
}
});
$('#chart<?php echo $key;?>').bind('jqplotDataRightClick',
function (ev, seriesIndex, pointIndex, data) {
$('#info3').html('series: '+seriesIndex+', point: '+pointIndex+', data: '+data);
}
);
});
</script>
<?php } ?>