Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_sparkline.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_sparkline.php  >  Download  
File: sample_sparkline.php
Role: Example script
Content type: text/plain
Description: simple sparkline chart
Class: QGoogle Chart
Render chart images using Google Chart
Author: By
Last change: renaming
Date: 2008-06-06 05:50
Size: 565 bytes
 

Contents

Class file image Download
<?php

require_once('GoogleChart.class.php');

$range range(25,100,8);
shuffle($range);

$graph = new QGoogleChart();
$graph    ->setSize(12088)
        ->
setType('line')
        ->
setSubtype('sparkline')
        ->
setAxis(array("x","y"))
        ->
setAxisStyles(array(0'#000000'7))
        ->
setAxisStyles(array(1'#000000'7))
        ->
setMarkers(array('spark''#C6D9FD',1,0,5))
        ->
setMarkers(array('spark''#4D89F9',0,0,1))
        ->
setGridLines(array(2050));

$graph    ->addData($range)
        ->
addData($range)
        ->
render();

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