<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(700, 300, 400, 500, 600, 800)
 
        ),
 
        "options" => array('title' => 'Countries'),
 
        "containerId" => 'visualization'
 
    )
 
))->createVar("wrapper");
 
 
$f0->add($wrapper);
 
$f0->add( google()->visualization->events()->addListener($wrapper->getVar(), "onmouseover", google::unescape("uselessHandler")) );
 
$f0->add( google()->visualization->events()->addListener($wrapper->getVar(), "ready", google::unescape("ready")) );
 
$f0->add( google(true, $wrapper->getVar())->draw() );
 
$f0->add( func()->add('alert("not called")')->getVar("uselessHandler") );
 
 
$f1 = google()->visualization->events()->addListener( 
 
    google(false, $wrapper->getVar())->getChart(), "onmouseover", google::unescape("usefulHandler")
 
);
 
 
$f0->add( func()->add($f1)->getVar("onReady") );
 
 
$f0->add( func()->add('alert("Mouser over event!")')->getVar("usefulHandler") );
 
 
echo $f0->getVar("drawVisualization");
 
 |