Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.google.areachart.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  >  QGoogleVisualizationAPI  >  sample.google.areachart.php  >  Download  
File: sample.google.areachart.php
Role: Example script
Content type: text/plain
Description: Area Chart Sample
Class: QGoogleVisualizationAPI
Google Visualization API (deprecated)
Author: By
Last change:
Date: 2008-07-12 01:56
Size: 833 bytes
 

Contents

Class file image Download
<html>
<head>
</head>

<body>
<?php

include_once 'config.inc.php';

$chart = new QAreachartGoogleGraph;
$chart    ->addDrawProperties(    
            array(
                
"title"=>'Company Performance',
                
'isStacked'=>'true',
                
"backgroundColor" => "{backgroundColor: {stroke:'black', fill:'#eee', strokeSize: 1}}"
            
)
        )
        ->
addColumns(array(array('string''Year'),array('number''Sales'),array('number''Expense')))
        ->
setValues(
            array(
                array(
00'2004'),
                array(
011000),
                array(
02400),
                array(
10'2005'),
                array(
111170),
                array(
12460),
                array(
20'2006'),
                array(
21660),
                array(
221120),
                array(
30'2007'),
                array(
311030),
                array(
32540),
            )
        );
echo 
$chart->render();

echo 
$chart->getReferenceLink();

?></body>
</html>