Ver Mensaje Individual
  #5 (permalink)  
Antiguo 25/11/2009, 13:35
Avatar de gjx2
gjx2
 
Fecha de Ingreso: agosto-2008
Ubicación: R.D
Mensajes: 1.153
Antigüedad: 15 años, 8 meses
Puntos: 139
Respuesta: problema con graficas

Solucion Al primer problema de
dcreate



Código php:
Ver original
  1. require_once ("jpgraph/jpgraph.php");  
  2. require_once ("jpgraph/jpgraph_line.php");  
  3. require_once ("jpgraph/jpgraph_bar.php");  
  4.  
  5.  
  6. $valor1= $_POST['valor1'];
  7. $valor2= $_POST['valor2'];
  8. $valor3= $_POST['valor3'];
  9.  
  10.  
  11. $datay = array($valor1,$valor2,$valor3);
  12.  
  13. $graph = new Graph(980,680);
  14. $graph->SetMarginColor('white');
  15. $graph->SetScale("intlin");
  16. $graph->SetShadow();
  17. $graph->SetFrame(true);
  18. $graph->img->SetMargin(80,30,80,40);
  19. $graph->title->Set('GRAFICA');
  20. $graph->ygrid->SetFill(true,'#[email protected]','#[email protected]');
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27. // Create the linear plot  
  28. $lineplot=new LinePlot($datay);  
  29. $lineplot->SetCenter();
  30. $lineplot->mark->SetType(MARK_FILLEDCIRCLE);
  31. $lineplot->mark->SetWidth(5);
  32. $lineplot->mark->SetColor('black');
  33. $lineplot->mark->SetFillColor('red');
  34. //$lineplot->SetCSIMTargets($targ,$alt);
  35.  
  36. // Add the plots to the graph  
  37. $graph->Add($lineplot);  
  38.  
  39. $graph->Stroke();