473,473 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

jpgraph problem

11 New Member
what's wrong for this php code. when I run did not display anything in browser..

this is code:

<?php
include ("C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/jpgraph-2.3/src/jpgraph.php");
include ("C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/jpgraph-2.3/src/jpgraph_bar.php");

$db = mysql_connect("localhost", "root","") or die(mysql_error());

mysql_select_db("test",$db) or die(mysql_error());

$sql = mysql_query("SELECT * FROM students") die(mysql_error());

while($row = mysql_fetch_array($sql))
{
$data[] = $row[1];
$leg[] = $row[0];
}

$graph = new Graph(250,150,"auto");
$graph->SetScale("textint");
$graph->img->SetMargin(50,30,50,50);
$graph->AdjBackgroundImage(0.4,0.7,-1); //setting BG type
$graph->SetBackgroundImage("linux_pez.png",BGIMG_FILLFRAM E); //adding image
$graph->SetShadow();

$graph->xaxis->SetTickLabels($leg);

$bplot = new BarPlot($data);
$bplot->SetFillColor("lightgreen"); // Fill color
$bplot->value->Show();
$bplot->value->SetFont(FF_ARIAL,FS_BOLD);
$bplot->value->SetAngle(45);
$bplot->value->SetColor("black","navy");

$graph->Add($bplot);
$graph->Stroke();
?>

any expert please help me..
Jan 13 '08 #1
2 2410
Markus
6,050 Recognized Expert Expert
I'm not an expert with jpgraph, but i'll try.

Have you tried using a relative url for the inclusion?
Jan 13 '08 #2
paeh
11 New Member
thanks guru..

can you give me example to do that?
Jan 13 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Leigh Riley | last post by:
Hi there, I've installed PHP on a variety of machines, but I seem to be having a lot of trouble on Windows XP. I have 4.3.2 installed, and I would like to use...
0
by: Andrew Rich | last post by:
anybody done linear regression with jpgraph ?
3
by: Jeff | last post by:
Could someone walk me step by step on how to install and get JpGraph running on a Windows 2000+Apache+PHP+MySql server? -Thanks Jeff
3
by: J˙Giusł vs ::NRG::ius | last post by:
Hi all. How can I draw a table with jpgraph? I want a table as image. Thanks. G:
2
by: iulian.ilea | last post by:
Hi, I use JpGraph to generate some graphs and I have to include those graphs in a pdf file, generated usign fPDF (http://www.fpdf.org/). If I include a png file it's ok, the pdf file is...
3
by: rahmawaktu | last post by:
Dear list, i am new to this forum and to JPGraph too. I just install jpgraph to create a graphic to my website. But i got error. Here is the complete code : First is MySQL Database : ( 2...
0
by: luckyG | last post by:
I have php (5.2.4) compiled on redhat 4.0 as followed : ./configure \ --with-oci8=$ORACLE_HOME --with-apxs=/usr/local/apache/bin/apxs \ --with-config-file-path=/usr/local/apache/conf \ ...
2
by: AARTHISUBBU | last post by:
i m quiet new to wamp... is it possible to run jpgraph codes in wamp... else i have to install jpgraph separately and to run?.. if i can run jpgraph codes in wamp,what i have to do? i m using...
0
by: eureka2050 | last post by:
Hi all, I am creating a radar chart containing 2 plots using jpgraph. My code is as follows:- include ("./jpgraph/src/jpgraph.php"); include ("./jpgraph/src/jpgraph_radar.php"); //...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.