Ver Mensaje Individual
  #9 (permalink)  
Antiguo 22/09/2005, 11:07
Avatar de ADIÓS_ADRIANA
ADIÓS_ADRIANA
 
Fecha de Ingreso: septiembre-2005
Mensajes: 263
Antigüedad: 18 años, 7 meses
Puntos: 0
Bueno, ya lo conseguí gracia a otro post de este foro y cambiar algunas cosillas,

También marca un problema de Headers, pero necesito utilizar esto en una página que muestra datos antes....como podría llamarlo ???

Código PHP:
<?php 
include ("jpgraph/src/jpgraph.php");
include (
"jpgraph/src/jpgraph_pie.php");
include (
"jpgraph/src/jpgraph_pie3d.php");


            
$host="localhost"
            
$user="root"
            
$password=""
            
mysql_connect($host,$user,$password); 
$result mysql_db_query("mi_base_de_datos","select country, count(provider_id)as total from provider group by country order by total DESC Limit 5"); 
while(
$row mysql_fetch_array($result)) 

//echo $row["total"]; 
$arreglo1[] = $row[0]; 
$arreglo2[] = $row[1]; 

//$gJpgBrandTiming=true; 

$data $arreglo2;

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

// Set A title for the plot
$graph->title->Set("Proveedores por Países");
$graph->title->SetFont(FF_FONT1,FS_BOLD); 
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.02,0.2);

// Create pie plot
$p1 = new PiePlot3d($data);
$p1->SetTheme("sand");
$p1->SetCenter(0.35);
$p1->SetAngle(30);
$p1->value->SetFont(FF_ARIAL,FS_NORMAL,12);
$p1->SetLegends($arreglo1);

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

?>