Login   Register  
PHP Classes
elePHPant
Icontem

File: sample.magictable.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.magictable.php  >  Download  
File: sample.magictable.php
Role: Example script
Content type: text/plain
Description: Sample for magic table
Class: QGoogleVisualizationAPI
Google Visualization API (deprecated)
Author: By
Last change:
Date: 5 years ago
Size: 864 bytes
 

Contents

Class file image Download
<?php
    
include_once 'config.php';

    
$data = array();
    
$i 15;
    do
      {
         
$j 4;
         do
         {
            
$data[] = array($i$jround(rand(0,10),0));
         }
         while (
$j-- > 0); 
      }
      while (
$i-- > 0);

    
    
$chart = new QMixupGoogleGraph;
    
    
$chart    ->addMember(QChart::getInstance('QMagictableGoogleGraph')->noPackage())
            ->
noPackage()
            ->
addColumns(array(
                array(
'number''column 1'),
                array(
'number''column 2'),
                array(
'number''column 3'),
                array(
'number''column 4'),
                array(
'number''column 5'),
                )
            )->
setValues($data);

    
$chart->render();

$result $chart->render();

?><html>
<head>
<?php
echo $result->script;
?>
</head>
<body>
<div class="clearfix" style="height:25px"></div>
<?php
echo $result->MagicTable;
?>
</body>
</html>