Welcome Guest, Not a member yet? Register   Sign In
CI + PEAR Image?
#1

[eluser]CJL01[/eluser]
Has anybody used CI with the PEAR Image Graph package? I'm trying to draw some graphs on a site... The install seems to have gone ok, but I'm really hoping somebody has a basic example of drawing a graph that I can use as a basis to get me going. All of the examples I've seen to date are written for 'stand-alone' PHP pages. For example;

Code:
<?php
include 'Image/Graph.php';    
$Graph =& Image_Graph::factory('graph', array(400, 300));
$Plotarea =& $Graph->addNew('plotarea');
$Dataset =& Image_Graph::factory('dataset');
$Dataset->addPoint('Denmark', 10);
$Dataset->addPoint('Norway', 3);
$Dataset->addPoint('Sweden', 8);
$Dataset->addPoint('Finland', 5);
$Plot =& $Plotarea->addNew('bar', &$Dataset);
$Graph->done();
?>

All help welcome!




Theme © iAndrew 2016 - Forum software by © MyBB