hi guys, just a little help regarding GD Graph, is it not possible to combine the graph plus a little code to echo or display?? because, when i try to insert the code in the upper part of the program, it runs but if i put the code in the middle of the program, it does not.

require_once("gdgraph.php");
$sizeOfTheGraph= new GDGraph(1027,353,"X Bar-R Chart");
$plottedData = Array('Sample Data' => Array(3.4868, 3.4870,3.4870));
$olors = Array('Sample Data' => Array(228,6,6));		
$x_labels = Array('0','1','2');			
$thicknesses = Array('Sample Data' => 10);
$sizeOfTheGraph->line_graph($plottedData, $colors, $x_labels);

please help..thanks ^^

hi guys, just a little help regarding GD Graph, is it not possible to combine the graph plus a little code to echo or display?? because, when i try to insert the code in the upper part of the program, it runs but if i put the code in the middle of the program, it does not.

require_once("gdgraph.php");
$sizeOfTheGraph= new GDGraph(1027,353,"X Bar-R Chart");
$plottedData = Array('Sample Data' => Array(3.4868, 3.4870,3.4870));
$olors = Array('Sample Data' => Array(228,6,6));		
$x_labels = Array('0','1','2');			
$thicknesses = Array('Sample Data' => 10);
$sizeOfTheGraph->line_graph($plottedData, $colors, $x_labels);

please help..thanks ^^

Yes, It is not possible to echo and displaying the graph, I have 2 suggestions for you to implement like this

Put the graph generation in different page
When ever you need to generate a graph
try like this

1)
echo "<img src='newpagegraph.php?data1=20.2&data2=4.40&anyothernecessarydata=otherdata'/>";

2)
echo "<iframe src='newpagegraph.php?data1=20.2&data2=4.40&anyothernecessarydata=otherdata'></iframe>";

Hope it helps you.

oh, thanks sir..i tried to display a simple hello world together with the graph but the graph did not show out. thanks for the code..^^

but still iam hoping that there is some..

oh, thanks sir..i tried to display a simple hello world together with the graph but the graph did not show out. thanks for the code..^^

but still iam hoping that there is some..

Have you tried implementing what I said..., If not do it, It will works for you.

sir, the code did not work, the image is crossed out.

sir, the code did not work, the image is crossed out.

Post your code here.. and manually execute your graph generation page by passing some parameters.

the code is just the same one you answered on your 1st post..

If we can see your code, we can understand better..and we will tell you the solution.