Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.column.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.column.php  >  Download  
File: sample.column.php
Role: Example script
Content type: text/plain
Description: Sample Column Chart
Class: QGoogleVisualizationAPI
Google Visualization API (deprecated)
Author: By
Last change: add reference link
Date: 6 years ago
Size: 774 bytes
 

Contents

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

<body>
<?php
include_once 'config.inc.php';
$chart = new QColumnchartGoogleGraph;
$chart    ->addDrawProperties(
            array(
                
"title"=>'Company Performance',
                
'isStacked'=>'true'
                
)
            )
        ->
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>