|    
			
				07/01/2010, 09:51
			
			
			  | 
  |   |  |  |  Fecha de Ingreso: diciembre-2009 
						Mensajes: 52
					 Antigüedad: 15 años, 10 meses Puntos: 1 |  | 
  |   llamar a una variable 
  buenas, el tema es el siguiente: tengo el codigo que me genera un grafico(archivo1) y nesecito llamar a una variable de otro archivo(archivo2). este grafico muestra los valores en barras de lo que esta en $datay es por eso que quiero cambiarle los datos por los ya calculados anteriormente en el otro archivo
 este es el codigo
 
 <?php
 require_once ('direccion/jpgraph/jpgraph.php');
 require_once ('direccion/jpgraph/jpgraph_bar.php');
 
 $datay=array(1,2,3); el array(1,2,3)es el valor que deseo reemplazar por una variable que esta en otro archivo dentro del mismo php
 
 
 //$data2y=array($porcentaje[$i]);
 
 // Create the graph. These two calls are always required
 $graph = new Graph(500,400);
 $graph->SetScale("textlin");
 
 $graph->SetShadow();
 $graph->img->SetMargin(40,30,20,40);
 
 // Create the bar plots
 $b1plot = new BarPlot($data1y);
 $b1plot->SetFillColor("orange");
 $b1plot->value->Show();
 //$b2plot = new BarPlot($data2y);
 //$b2plot->SetFillColor("blue");
 //$b2plot->value->Show();
 
 // Create the grouped bar plot
 $gbplot = new AccBarPlot(array($b1plot,));//$b2plot));
 
 // ...and add it to the graPH
 $graph->Add($gbplot);
 
 $graph->title->Set("Accumulated bar plots");
 $graph->xaxis->title->Set("EJE X");
 $graph->yaxis->title->Set("EJE Y");
 
 $graph->title->SetFont(FF_FONT1,FS_BOLD);
 $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
 $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
 
 // Display the graph
 $graph->Stroke();
 ?>
     |