0

I am trying to implement the PHP Graph demo (http://www.ebrueggeman.com/phpgraphlib/documentation/tutorial-mysql-and-phpgraphlib) for php chart given in this tutorial. But on adding the second line of the demo, it is giving a black screen. These are the first two lines of demo

include("phpgraphlib.php");
$graph=new PHPGraphLib(550,350);

I checked servers PHP version and GD version. They are in order What could be the reason for the black screen and how to implement the php graph. Thanks.

user20152015
  • 344
  • 2
  • 23

1 Answers1

0

Just answering for reference sake..

include("phpgraphlib.php");
$graph = new PHPGraphLib(400,300);
$data = array("Alex"=>99, "Mary"=>98, "Joan"=>70, "Ed"=>90);
$graph->addData($data);
$graph->setTitle("Test Scores");
$graph->setTextColor("blue");
$graph->createGraph();