PHP Classes
elePHPant
Icontem

File: demos/004.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  >  d3Google  >  demos/004.php  >  Download  
File: demos/004.php
Role: Example script
Content type: text/plain
Description: writing a data table snippet
Class: d3Google
Generate JavaScript to show Google charts and maps
Author: By
Last change:
Date: 2 years ago
Size: 713 bytes
 

Contents

Class file image Download
<?php
include_once '../d3.classes.inc.php';
include_once
'../google.classes.inc.php';
include_once
'../element.php';

echo
google()->visualization->DataTable(obj(array(

   
"cols" => array(
        array(
"id" => 'task', "label" => 'Task', "type" => 'string'),
        array(
"id" => 'hours', "label" => 'Hours per Day', "type" => 'number')
    ),
   
"rows" => array(
        array(
"c" => array(array("v" => 'Work'), array("v" => 11))),
        array(
"c" => array(array("v" => 'Eat'), array("v" => 2))),
        array(
"c" => array(array("v" => 'Commute'), array("v" => 2))),
        array(
"c" => array(array("v" => 'Watch TV'), array("v" => 2))),
        array(
"c" => array(array("v" => 'Sleep'), array("v" => 7, "f" => '7.000')))
    )
   
) ) );