use PHP to create SVG graph
SVGGraph is an object-oriented PHP library for creating simple PHP graphs, released as open source under the LGPL v3 license. Here are some examples of different types of graph supported by SVGGraph.
If you are still using PHP4, then you should use version 1.2.1 of SVGGraph: SVGGraph.zip [35k] orSVGGraph.tar.bz2 [25k]. Please read the included README.txt file for the correct instructions for the earlier version.
This library provides PHP classes and functions for easily creating SVG graphs from data. As of version 2.0, SVGGraph works with PHP 5 only, PHP 4 support has been dropped.
Here is a basic example:
$graph = new SVGGraph(640, 480); $graph->colours = array('red','green','blue'); $graph->Values(100, 200, 150); $graph->Links('/Tom/', '/Dick/', '/Harry/'); $graph->Render('BarGraph');
This will create a SVG file containing a 640x480 bar graph with three hyperlinked bars.
Source from: http://www.goat1000.com/svggraph.php
留言
張貼留言