I did an example with the drilldown, but when I click on the master, nothing is displayed. Please see my code.
DrillDown::create(array(
"name"=>"BeneficiaireLocalite",
"title"=>"Bénéficiaire par localite",
"levels"=>array(
array(
"title"=>"Toutes regions",
"content"=>function($params,$scope)
{
ColumnChart::create(array(
"dataSource"=>(
$this->src("test")->query("
SELECT r.nomreg region,count(*) as nombre
FROM region r, beneficiaire b
where r.idreg=b.idreg
GROUP BY region
")
),
"clientEvents"=>array(
"itemSelect"=>"function(params){
BeneficiaireLocalite.next({region:params.selectedRow[0]});
}",
)
));
}
),
array(
"title"=>function($params,$scope)
{
return "Region ".$params["region"];
},
"content"=>function($params,$scope)
{
ColumnChart::create(array(
"dataSource"=>(
$this->src("test")->query("
SELECT p.nompref prefecture, count(*) as nombre
FROM beneficiaire b join prefecture p on b.idpref=p.idpref
join region r on p.idreg=r.idreg
WHERE r.nomreg=:region
GROUP BY prefecture
")
->params(array(
":region"=>$params["region"]
))
)
,
));
}
),
),
));