Software & UtilitiesTechnology

A PHP Object-Oriented SVG Graph Library – SVGGraph

php-graph-library

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 the different types of graph supported by SVGGraph.

There are multiple chart types supported like (3D) bar, line, (3D) pie and scatter where every chart has its own PHP class in a seperate file. So, you can use only the features you need.

Please feel free to join us and you are always welcome to share your thoughts even if you have more reference links related to other tips and tricks that our readers may like.
Don’t forget to Subscribe to our  RSS-feed subscribe to our RSS-feed and
Follow us on  Twitter follow us on Twitter — for recent updates.

Charts can be customized in many ways including the title, description, paddings, colors, labels and much more.

Every new release has only support for PHP5 but a pretty old, PHP4 compatible version is still offered.

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 of SVGGraph

 $graph = new SVGGraph(640, 480);
 $graph->colours = array('red' ,'green' ,'blue' );
 $graph->Values(100, 200, 150);
 $graph->Links('/Tom/' , '/Dick/' , '/Harry/' );
 $graph->Render('BarGraph' );

Graph types

At the moment these types of graph are supported by SVGGraph:

BarGraph
vertical bars, optionally hyperlinked;
LineGraph
a line joining the data points, with optionally hyperlinked markers at the data points;
PieGraph
a pie chart, with optionally hyperlinked slices and option to fade labels in/out when the pointer enters/leaves a slice;
Bar3DGraph
a 3D-looking version of the BarGraph type.
Pie3DGraph
a 3D-looking version of the PieGraph type.
ScatterGraph
markers drawn at arbitrary horizontal and vertical points.

Using SVGGraph

The library consists of several class files which must be present. To use SVGGraph, include or require the SVGGraph.php class file. The other classes should be in the same directory as this main file to be loaded automatically.

Download SVGGraphy Library

Requirements: PHP5
Compatibility: All Major Browsers (IE requires SVG Viewer plugin)
Website: http://www.goat1000.com/svggraph.php

Admin

We hope, We will become the best, creative and inspiring community for web and graphics. Join Us! Can be part of the growing Team. Just write something Creative and Interesting. Click here to become a member.

0 Shares
Tweet
Share
Share
Pin