Login   Register  
PHP Classes
elePHPant
Icontem

File: demos/006.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/006.php  >  Download  
File: demos/006.php
Role: Example script
Content type: text/plain
Description: add events
Class: d3Google
Generate JavaScript to show Google charts and maps
Author: By
Last change:
Date: 1 year ago
Size: 1,233 bytes
 

Contents

Class file image Download
<pre><?php 

include_once '../d3.classes.inc.php';
include_once 
'../google.classes.inc.php';
include_once 
'../element.php';

$f0 func();

$wrapper google()->visualization->ChartWrapper(obj(
    array(
        
"chartType" => 'ColumnChart',
        
"dataTable" => array(
            array(
'Germany''USA''Brazil''Canada''France''RU'),
            array(
700300400500600800)
        ),
        
"options" => array('title' => 'Countries'),
        
"containerId" => 'visualization'
    
)
))->
createVar("wrapper");

$f0->add($wrapper);
$f0->addgoogle()->visualization->events()->addListener($wrapper->getVar(), "onmouseover"google::unescape("uselessHandler")) );
$f0->addgoogle()->visualization->events()->addListener($wrapper->getVar(), "ready"google::unescape("ready")) );
$f0->addgoogle(true$wrapper->getVar())->draw() );
$f0->addfunc()->add('alert("not called")')->getVar("uselessHandler") );

$f1 google()->visualization->events()->addListener
    
google(false$wrapper->getVar())->getChart(), "onmouseover"google::unescape("usefulHandler")
);

$f0->addfunc()->add($f1)->getVar("onReady") );

$f0->addfunc()->add('alert("Mouser over event!")')->getVar("usefulHandler") );

echo 
$f0->getVar("drawVisualization");