Ver Mensaje Individual
  #2 (permalink)  
Antiguo 31/03/2015, 01:09
todasontodas
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Graficas con PHP y MySQL

Por ahora lo que tengo es y no me funciona es:

include("jpgraph/src/jpgraph.php");
include("jpgraph/src/jpgraph_pie.php");
include("jpgraph/src/jpgraph_pie3d.php");

$query = mysql_query("select Fecha, Cantidad from $pais where Fecha between '$canton' and '$parroquia'");

while($row = mysql_fetch_array($query))
{
$data[] = $row[0];
$can[] = $row[1];
}

$graph = new PieGraph(550,300,"auto");
$graph->img->SetAntiAliasing();
$graph->SetMarginColor('gray');
//$graph->SetShadow();

// Setup margin and titles
$graph->title->Set("Fecha y cantidad");

$p1 = new PiePlot3D($data);
$p1->SetSize(0.45);
$p1->SetCenter(0.4);

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

$p1->SetLegends($can);
$p1->ExplodeAll();

$graph->Add($p1);
$graph->Stroke();


Si alguien me echa una mano se lo agradeceria.