PHP Classes
elePHPant
Icontem

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

Contents

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

<body>
<?php

include_once 'config.inc.php';
$chart = new QLinechartGoogleGraph;
$chart ->addDrawProperties(
            array(
               
"title"=>'Company Performance',
                )
            )
        ->
addColumns(
            array(
                array(
'string', 'Year'),
                array(
'number', 'Sales'),
                array(
'number', 'Expenses')
                )
            )
        ->
setValues(
            array(
                array(
0, 0, '2004'),
                array(
0, 1, 1000),
                array(
0, 2, 400),
                array(
1, 0, '2005'),
                array(
1, 1, 1170),
                array(
1, 2, 460),
                array(
2, 0, '2006'),
                array(
2, 1, 660),
                array(
2, 2, 1120),
                array(
3, 0, '2007'),
                array(
3, 1, 1030),
                array(
3, 2, 540),
            )
        );


echo
$chart->render();

echo
$chart->getReferenceLink();

?></body>
</html>