Buenas tardes amigo, asi es, te mando el codigo donde se manda llamar la grafica, en esta linea es donde se agregan los ragos: ['<?php echo $status; ?>', <?php echo $a, $b, $c ?>],
<?php
require_once("conexion/conexion.php");
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Highcharts Example</title>
<script type="text/javascript" src="
http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<style type="text/css">
${demo.css}
</style>
<script type="text/javascript">
$(function () {
$('#container').highcharts({
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false
},
title: {
text: 'VISTA DE STATUS DE DOCUMENTOS DE ENTRADA'
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
}
}
}
},
series: [{
type: 'pie',
name: 'Documentos de entrada',
data: [
<?php
$sentencia="SELECT * FROM documento";
$resultado=mysql_query($sentencia);
$fecha = date("Y-m-d");
$a = 0; // Variable para "En tiempo"
$b = 0; // Variable para "En limite de tiempo"
$c = 0; // Variable para "Fuera de limite de tiempo
while($filas=mysql_fetch_assoc($resultado))
{
if ($filas['fecha_limite_atencion'] > $fecha) {
$a++;
$status = "En tiempo: ";
} else if ($filas['fecha_limite_atencion']==$fecha) {
$b++;
$status = "En limite de tiempo:";
} else if ($filas['fecha_limite_atencion'] < $fecha) {
$c++;
$status = "Fuera de limite de tiempo: ";
}
?>
['<?php echo $status; ?>', <?php echo $a, $b, $c ?>], <?php
}
?>
]
}]
});
});
</script>
</head>
<body>
<script src="Highcharts-4.1.5/js/highcharts.js"></script>
<script src="Highcharts-4.1.5/js/modules/exporting.js"></script>
<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
<br><br>
<!--<center><a href="ejemplo2.php">Ver ejemplo 2</a></center>-->
</body>
</html>