Hi I am running apache/mysql/php on a Windows 7 environment. I installed pChart, ran the script to test for the gd2 library (simple .ini edit as I have the ext folder) and it was successful. However I am now trying to generate a simple graph by following the code on the basic syntax page,
http://wiki.pchart.net/doc.basic.syntax.html. All I am getting is the broken icon image, the one that shows if your image path reference is wrong. Just in case I left out something here is the code I used, right off the page.
Code:
<?php
/* Include all the classes */
include("pChart/class/pDraw.class.php");
include("pChart/class/pImage.class.php");
include("pChart/class/pData.class.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pchart</title>
</head>
<?php
/* Create your dataset object */
$myData = new pData();
/* Add data in your dataset */
$myData->addPoints(array(VOID,3,4,3,5));
/* Create a pChart object and associate your dataset */
$myPicture = new pImage(700,230,$myData);
/* Define the boundaries of the graph area */
$myPicture->setGraphArea(60,40,670,190);
/* Choose a nice font */
$myPicture->setFontProperties(array("FontName"=>"pChart/fonts/Forgotte.ttf","FontSize"=>11));
/* Draw the scale, keep everything automatic */
$myPicture->drawScale();
/* Draw the scale, keep everything automatic */
$myPicture->drawSplineChart();
/* Build the PNG file and send it to the web browser */
$myPicture->Stroke();
?>
<body>
</body>
</html>
When I try the other examples that use the
Code:
Render("imagename.png")
The image file appears in the root folder but same problem, nothing shows. Just a blank page.
HELP!