Ver Mensaje Individual
  #1 (permalink)  
Antiguo 27/06/2013, 11:21
Avatar de fmb1982
fmb1982
 
Fecha de Ingreso: junio-2007
Mensajes: 128
Antigüedad: 16 años, 11 meses
Puntos: 0
Sonrisa Problemas con PHP - jpgraph


Tengo problemas al tratar de hacer una grafica con jpgraph me marca este error
"Fatal error: Unsupported operand types in C:\xampp\htdocs\bitacora\jg\jpgraph_pie3d.php on line 444" obviamente la libreria no esta mal, yo estoy pasando el dato mal o no se :( , alguien puede ayudarme...

Código HTML:
<?php 
include ("dba.php"); 
include ("tools.php");
include ("jg/jpgraph.php"); 
include ("jg/jpgraph_pie.php");
include ("jg/jpgraph_pie3d.php");
$arreglo1[]=array();
$arreglo2[]=array();
 			  $query = mysql_query("select b_act,count(b_act) from bitacora GROUP by b_act");
              $result = mysql_num_rows($query);
              for ($punt=0;$punt<$result;$punt++)
			  {
			  $resultd = mysql_fetch_array($query);
			  $arreglo1[]=$resultd['b_act'];
			  $arreglo2[]=$resultd['count(b_act)'];
			  }

$graph = new PieGraph(450,200,"auto"); 
$graph->img->SetAntiAliasing(); 
$graph->SetMarginColor('gray'); 
$graph->SetShadow(); 

// Setup margin and titles 
$graph->title->Set("Ejemplo: Horas de Trabajo"); 

$p1 = new PiePlot3D($arreglo1); 
$p1->SetSize(0.35); 
$p1->SetCenter(0.5); 

// Setup slice labels and move them into the plot 
$p1->value->SetFont(FF_FONT1,FS_BOLD); 
$p1->value->SetColor("black"); 
$p1->SetLabelPos(0.2); 

$p1->SetLegends($arreglo2); 

// Explode all slices 
$p1->ExplodeAll(); 

$graph->Add($p1); 
$graph->Stroke();
?>
__________________
Fidel Medina Bravo
TodocabeN150charsabiendoloacomodar...
http://about.me/fidelMB