tags:

views:

4167

answers:

10

What do you think is the best diagram and graphing toolset for PHP that also look good?

I know that there are some open source graphing tools for PHP out there, but they are not really visually appealing to me.

+7  A: 

I think you should check out pChart. It is very very slick, including antialiasing and all sorts of nice aesthetics. It's pretty easy to use and there are a tonne of tutorials:

http://pchart.sourceforge.net/

Cetra
this is outstanding
Andrew Heath
+1  A: 

If you are in need of a pure PHP solution, then I think the ezComponents graph package is what you are looking for. It's very sophisticated and the examples are pretty outstanding, check this tutorial for a couple examples.

The reasons why I like to recommend ezComponents:

  • easy to install through the PEAR install
  • awesome code quality (clear CS across the board, documentation)
  • clear IP and liberal license (New BSD License)
Till
+1  A: 

I think JpGraph is fantastic.

Steve M
A: 

You should give more details about what you want to do with it. Still, I used Artichow to produce a economical data analysis to my business department, and it was perfect.

Some relevant points :

  • require GD2
  • main documentation in French, but codes examples are included in the release and it's plain PHP + english
  • as good as jpgraph (nice work too), but free and open source

The tool is really easy to learn and produce nice graphics at a reasonable speed rate.

Here is what it looks like (from the official doc) :

<?php
/*
 * This work is hereby released into the Public Domain.
 * To view a copy of the public domain dedication,
 * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to
 * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
 *
 */

require_once "../../BarPlot.class.php";

$graph = new Graph(450, 400);

$graph->setAntiAliasing(TRUE);

$blue = new Color(0, 0, 200);
$red = new Color(200, 0, 0);

$group = new PlotGroup;
$group->setPadding(40, 40);
$group->setBackgroundColor(
    new Color(240, 240, 240)
);

$values = array(12, 8, 20, 32, 15, 5);

$plot = new BarPlot($values, 1, 2);
$plot->setBarColor($blue);
$plot->setYAxis(Plot::LEFT);

$group->add($plot);
$group->axis->left->setColor($blue);
$group->axis->left->title->set("Blue bars");

$values = array(6, 12, 14, 2, 11, 7);

$plot = new BarPlot($values, 2, 2);
$plot->setBarColor($red);
$plot->setYAxis(Plot::RIGHT);

$group->add($plot);
$group->axis->right->setColor($red);
$group->axis->right->title->set("Red bars");

$graph->add($group);
$graph->draw();
?>
e-satis
+2  A: 

Not necessarily the best, but Open flash chart looks nice and is quite easy to use if you don't mind embedding Flash objects in your site.

Component includes swf file which is embedded to the page and classes for outputting needed html in several different languages including PHP.

iiska
+1  A: 

Check out http://pear.veggerby.dk/

Martin Hoegh
A: 

PHP GD

Your imagination is the limit.

Iulian Şerbănoiu
+6  A: 
rikh
Please note that you need to notify Google if you expect more than 250,000 requests a day.
Randell
The problem with Google Chart is that it does not support negative values. You need to do a work around to get negative values, which is a pain.
Marcel Tjandraatmadja
+1  A: 

I would recommend fusioncharts - fusion charts demo

It uses XML so you can use whatever language you like. Very clean and very visually appealing. I think they even have maps.

Arthur Miller
Please note that the professional (better) version of Fusion Charts is not free.
Randell
A: 

JPGraph does a good job. You can find a tutorial showing you how to use JPGraph with PHP here.

Phyxx