954,580 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PHP Graphing Solution

Hello members..

I needed to implement dynamic graph solution in PhP and got this wonderful article which serves my purpose.
http://www.kidslovepc.com/php-tutorial/php-dynamic-chart-plot.php

I played with it as they told me to but did not get any output from the samples :'( I tried the installation test and its showing that everything is proper. But when i download the package and run any eg in that it shows.

I tried this bit of code here below
<?php
//Include the code
include("phplot/phplot.php");

//Define the object
$graph =& new PHPlot(200,150);

//Define some data
$example_data = array(
array('a',3),
array('b',5),
array('c',7),
array('d',8),
array('e',2),
array('f',6),
array('g',7)
);
$graph->SetDataValues($example_data);
$graph->SetXTickPos('none');
$graph->SetXTickLabelPos('none');

//Draw it
$graph->DrawGraph();
?>


The image cannot be displayed and the error message is not in text but written in image!! :-O

Any clues on how to proceed will be of greaa....at help.:)
Thank you...

Attachments Capture.PNG 74.46KB
uvray90
Newbie Poster
6 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

Seems like this is a class custom error message. Look at the documentation or support forum if they have one.

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

Hey Ardav... Thanks for your reply bro.
But i didn modify any of the classes or any other stuff. Directly downloaded it and put it to Wamp (latest version and GD enabled) and tried it (and got ERROR :-) ). Every one are getting the output cause many have commented it as very well. And all other graphing solution i tried are showing the SAME ERROR!! And I came upon some conclusion " MOstly Iam doing something wrong here!" . Please guys any kind of lead would be helpful :-) . Thank you...

uvray90
Newbie Poster
6 posts since Nov 2011
Reputation Points: 10
Solved Threads: 0
 
$graph =& new PHPlot(200,150);


has been deprecated, try:

$graph = new PHPlot(200,150);


The error message, I think is a browser error message. Try disabling output buffering for now to see if it works. http://muzso.hu/2008/02/19/php-output-buffering

diafol
Rhod Gilbert Fan (ardav)
Moderator
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: