JpGraph – a free php diagram library

Imagine, you have some data that you would like to visualize. But normally this is a really ugly job.
JpGraph is a really easy to use php library that helps you dealing with such problems.

diagram example code

<?php
require_once("jpgraph.php");
require_once("jpgraph_line.php");
$prod=array(12,14,3,8,12,'',7,13,19.5,4);
$graph = new Graph(540,300);
$graph->SetScale('intlin');
$lineplot1=new LinePlot($prod);
$lineplot1->SetFillColor("orange");
$graph->Add($lineplot1);
$graph->Stroke();
?>

results in the following diagram:

JpGraph example for a line plot, generated with PHP

JpGraph example for a line plot, generated with PHP

More information about JpGraph

You can find more information about JpGraph on the homepage of JpGraph. It’s free for non-commercial use; for commercial usage, the author charges little money – compared to other available (commercial) tools.