0

Doing some testing of PHPgraphlib, having a problem creating an image of the graph/s Using one of their examples.

      include('lib/phpgraphlib.php');
      include('lib/phpgraphlib_pie.php');
      $graph = new PHPGraphLibPie(400, 200, 'img/graph.png');
      $data = array("CBS" => 6.3, "NBC" => 4.5,"FOX" => 2.8, "ABC" => 2.7, "CW" => 1.4);
      $graph->addData($data);
      $graph->setTitle('8/29/07 Top 5 TV Networks Market Share');
      $graph->setLabelTextColor('50,50,50');
      $graph->setLegendTextColor('50,50,50');
      $graph->createGraph();

No image is created in either the folder or on the root? GD is enabled.

1 Answers1

1

Make sure you have write permissions to destination directory. For example, if Apache web server is executing php script, Apache user should have permissions to write this directory.

t0mislav
  • 11
  • 2