Ver Mensaje Individual
  #2 (permalink)  
Antiguo 30/11/2007, 12:43
komodo
 
Fecha de Ingreso: noviembre-2006
Mensajes: 437
Antigüedad: 17 años, 5 meses
Puntos: 3
Re: Problemas con jpgraph??

Hola! Comprueba que tienes las librerias en la ruta que has puesto. En el stroke creo que no puedes poner un archivo php. He modificado tu código prueba haber si te funciona asi:

Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>GRAFICA</title>
</head>
<body>
<?php
//include ("../funcion/conexion.php");
include ("C:/wamp/www/sitio/jpgraph-1.21b/jpgraph-1.21b/src/jpgraph.php");
include ("C:/wamp/www/sitio/jpgraph-1.21b/jpgraph-1.21b/src/jpgraph_pie.php");
include ("C:/wamp/www/sitio/jpgraph-1.21b/jpgraph-1.21b/src/jpgraph_pie3d.php");

$con=mysql_connect("localhost","root","");
mysql_select_db("radiotaxi",$con);

mysql_connect($host,$usuarioBD,$contaseñaBD);
$result = mysql_db_query("$radiotaxi","select count(id_taxi), fecha as SEMANA from $servicio ");
while($row = mysql_fetch_array($result)){

$datax[] = $row[SEMANA];
$datay[] = $row[fecha];

}
// Some data
//$data = array(20,27,45,75,90);

// Create the Pie Graph.
$graph = new PieGraph(350,200,"auto");
$graph->SetShadow();

// Set A title for the plot
$graph->title->Set("Grafico");
$graph->title->SetColor("darkblue");


// Create pie plot
$p1 = new PiePlot3d($datax);
$p1->SetTheme("sand");
$p1->SetCenter(0.4);
$p1->SetLegends($datay);
$graph->Add($p1);
$graph->Stroke(C:\wamp\www\sitio\jpgraph-1.21b\graficas\grafica.png);
?>
</body>
</html>

Última edición por komodo; 30/11/2007 a las 12:49