Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.bar.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.bar.php  >  Download  
File: sample.bar.php
Role: Example script
Content type: text/plain
Description: Bar Chart Sample
Class: QGoogleVisualizationAPI
Google Visualization API (deprecated)
Author: By
Last change: add reference link
Date: 2008-07-01 11:56
Size: 896 bytes
 

Contents

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

<body>
<?php

//include_once '../config/config.inc.php';

include_once("config.inc.php");

$chart = new QBarchartGoogleGraph;
$chart    ->addDrawProperties(
            array(
                
"title"=>'Company Performance',
                
'isStacked'=>'true',
                
"backgroundColor" => "{stroke:'black', fill:'#eee', strokeSize: 1}"
                
)
            )
        ->
addColumns(
            array(
                array(
'string''Year'),
                array(
'number''Sales'),
                array(
'number''Expenses')
                )
            )
        ->
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>