473,507 Members | 11,372 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Drawing Graphs with PHP

Hi, I'm looking for a package useful to draw graphs (like those listed at
the page http://www.graphviz.org/, not general charts). Can you provide me
with some indication please? Many thanks!
Best,
Nic
May 5 '06 #1
6 2609
hi,
The only option with which we draw graph in PHP is GD package. You can
device your algorithm to draw graphs. In fact graph are great area in
mathematics and computing.

Also pls check out in www.phpclasses.org if u hav any classes for the
purpose.

princeofcode

May 5 '06 #2
NC
Nico wrote:
I'm looking for a package useful to draw graphs (like those
listed at the page http://www.graphviz.org/, not general charts).


How about Graphviz itself? The Graphviz resource page:

http://www.graphviz.org/Resources.php

mentions several PHP applications that use Graphviz, including a PEAR
class. Take a look at those; perhaps, one of them will help you figure
out how to make Graphviz work with PHP...

Cheers,
NC

May 5 '06 #3
"Nico" <no****@nospam.nospam> wrote in
news:44***********************@reader2.news.tin.it :
Hi, I'm looking for a package useful to draw graphs (like those listed
at the page http://www.graphviz.org/, not general charts). Can you
provide me with some indication please? Many thanks!
Best,
Nic


http://www.aditus.nu/jpgraph/

May 5 '06 #4
NC
Good Man wrote:
"Nico" <no****@nospam.nospam> wrote in
news:44***********************@reader2.news.tin.it :
Hi, I'm looking for a package useful to draw graphs (like those listed
at the page http://www.graphviz.org/, not general charts).


http://www.aditus.nu/jpgraph/


As much as I like JpGraph, it's probably not going to work too well;
the OP seems to want to draw tree charts, relationship diagrams, and
the like... For those, JpGraph will be a very minor improvement over
starting from scratch...

Cheers,
NC

May 5 '06 #5
NC wrote:
Nico wrote:
I'm looking for a package useful to draw graphs (like those
listed at the page http://www.graphviz.org/, not general charts).


How about Graphviz itself? The Graphviz resource page:

http://www.graphviz.org/Resources.php


That's what I do - I generate dot files using PHP, and output them to a
temporary file (using a caching mechanism). The use the header() function
to tell the browser I'm sending it a Jpeg image.

Looks something like this:
<?php

....

$cache_name=get_cache_name();
if (not_cached($cache_name)) {
$dotfile=gen_dot_file();
$tmpfile=write_tmp_file($dotfile);
// this was a quick hack so I dumped the dot file into
// a temp file - but with a bit of effort you could
// send it to stdin instead
$run="/usr/bin/dot -Tjpg -o $cache_name $tmpfile";
$output=`$run`;
}
header("Content-type: image/jpeg");
readfile($cache_name);
?>

HTH

C.
May 6 '06 #6
Many thanks!
I'll try graphviz.
Nic

"NC" <nc@iname.com> ha scritto nel messaggio
news:11*********************@i40g2000cwc.googlegro ups.com...
Good Man wrote:
"Nico" <no****@nospam.nospam> wrote in
news:44***********************@reader2.news.tin.it :
> Hi, I'm looking for a package useful to draw graphs (like those listed
> at the page http://www.graphviz.org/, not general charts).


http://www.aditus.nu/jpgraph/


As much as I like JpGraph, it's probably not going to work too well;
the OP seems to want to draw tree charts, relationship diagrams, and
the like... For those, JpGraph will be a very minor improvement over
starting from scratch...

Cheers,
NC

May 6 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
11909
by: TheDD | last post by:
Hi all, i have a question: is there any librairy for drawing graphs with PHP? Not graphs like histogram or alike, but like a set of shapes linked together in a certain way (like a flow chart...
8
48007
by: Stefan Burger | last post by:
Those of you who are in need for drawing vector lines might be interested in the following code. DrawLine( x1, y1, x2, y2, color ) draws a vector line from any Point x1,y1 to any Point x2,y2 in...
19
4781
by: Atif | last post by:
Hello all, In my html page I want to add an image say of 800x600. Now I want that when ever I am given two coordinates on this image say (x1, y1)=(50, 100) and (x2, y2)=(200, 300), the java script...
0
1340
by: SS KANAGAL | last post by:
Hello, I am drawing a bar graph in an aspx page using System.Drawing namespace . Now I want to provide drill down facility for the graph i.e. on click of a bar in the graph it should get me yet...
0
590
by: Ray Mitchell | last post by:
Hello, I need to write an application that displays multiple graphs on multiple tabbed sheets in a single window. The graphs are all simple X-Y line graphs like you'd see on an oscilloscope,...
2
1439
by: ZUP_DUDE | last post by:
Hi All, I'm looking for a good paperback resource on the System.Drawing objects. I'm looking to create graphs and convert graphics from one type to another. Any Suggestions would be helpful. ...
5
2488
by: Steve Marshall | last post by:
Hi all, I am converting an app which used a picturebox to draw graphs etc onto, then saved them to a file. I can certainly draw things onto a picturbox in VB.NET, but how do I save them to a...
1
1587
by: Jonathan Daugherty | last post by:
Hello, I'm looking at a number of chart-drawing libraries and modules for Python and I'd like to know which one people tend to consider the best. I've tried gdchart2 but its interface seems...
2
2487
by: asdf | last post by:
I was told that it is difficult to draw plots and graphs in C++, right? In matlab, if I have data, it's very easy to generate the plots, and I want to know how C++ handles such output.
0
7221
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
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7029
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5619
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,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1537
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 ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.