Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_ryon.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  QGoogle Chart  >  sample_ryon.php  >  Download  
File: sample_ryon.php
Role: Example script
Content type: text/plain
Description: Resampled from GoogleGraph Class written by Ryon Sherman
Class: QGoogle Chart
Render chart images using Google Chart
Author: By
Last change: renaming
Date: 2008-06-06 05:49
Size: 1,290 bytes
 

Contents

Class file image Download
<?php

require_once('GoogleChart.class.php');

$graph = new QGoogleChart();
$graph    ->setSize(500500)
        ->
setType('bar')
        ->
setSubtype('vertical_grouped')
        ->
setTitle('This is a test')
        ->
setTitleColor('#FF0000')
        ->
setTitleSize(50)    
        ->
setAxis()

        ->
setGridLines(array(205010))

        ->
setFill('chart''#000000''solid')
        ->
setFill('background''#FFFFFF''gradient''#000000'900.50)

        ->
setAxisLabels(array('Jan''July''Jan''July''Jan'))
        ->
setAxisLabels(array('0','100'))
        ->
setAxisLabels(array('A''B''C'))
        ->
setAxisLabels(array('2005''2006''2007'))    

        ->
setAxisRanges(array(0200300400))
        ->
setAxisStyles(array(0'#0000dd'10))
        ->
setAxisStyles(array(3'#0000dd'121))    

        ->
setLabelPositions(array(1103775))
        ->
setLabelPositions(array(20124))        

        ->
setLineColors(array('#FF0000''#00FF00''#0000FF'))
        ->
setLineStyles(array(363))
        ->
setLineStyles(array(110))

        ->
setMarkers(array('cross''#FF0000'0120))    
        ->
setMarkers(array('diamond''#80C65A'0220))    
    
        ->
addData(array(5105895))
        ->
addData(array(530863))
        ->
addData(array(317904))

        ->
render();
        
?><img src="<?php echo $graph->getURL() ?>"/>