Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/11/2008, 07:17
Avatar de hoberwilly
hoberwilly
 
Fecha de Ingreso: julio-2008
Ubicación: Lima - Perú
Mensajes: 769
Antigüedad: 16 años, 7 meses
Puntos: 2
Pregunta Falla en creacion de graficas (JpGraph)

Estimados amigos, que estara pasando con el siguiente error que me lanza:
Fatal error: Cannot instantiate non-existent class: graph in /data/members/free/tripod/es/h/o/b/hoberwilly/htdocs/estadistica.php on line 9
cuando uso este codigo recogido de la web:
Código php:
Ver original
  1. <!-- <?php
  2. include ("jpgraph/jpgraph.php");
  3. include ("jpgraph/jpgraph_line.php");
  4.  
  5. // Some data
  6. $ydata = array(11.5,3,8,12,5,1,9,13,5,7);
  7.  
  8. // Create the graph. These two calls are always required
  9. $graph = new Graph(450,250,"auto");
  10. $graph->SetScale("textlin");
  11. $graph->img->SetAntiAliasing();
  12. $graph->xgrid->Show();
  13.  
  14. // Create the linear plot
  15. $lineplot=new LinePlot($ydata);
  16. $lineplot->SetColor("black");
  17. $lineplot->SetWeight(2);
  18. $lineplot->SetLegend("Horas");
  19.  
  20. // Setup margin and titles
  21. $graph->img->SetMargin(40,20,20,40);
  22. $graph->title->Set("Ejemplo: Horas de Trabajo");
  23. $graph->xaxis->title->Set("Días");
  24. $graph->yaxis->title->Set("Horas de Trabajo");
  25. $graph->ygrid->SetFill(true,'#[email protected]','#[email protected]');
  26. //$graph->SetShadow();
  27.  
  28. // Add the plot to the graph
  29. $graph->Add($lineplot);
  30.  
  31. // Display the graph
  32. $graph->Stroke();
  33. ?>
  34. -->

Y gracias por la ayuda brindada