Now, after a couple of weeks of coding and forum questions, I guess I'm getting my dashboard project in a good and functional state, soom I'll focus my attention only to SQLs and Tables to get my data on the graphs. Thank you guys for that.
But now, for last, I went to try out the DrillDown package and got amazed how it seems off the dashboard way, at least in the samples. It may look noob of me, but I could not find how to communicate with the dashboard from within the koolreport inside a KWidget. For example, I tried to:
Level::create()
->widget(
KWidget::create()
->use(\koolreport\widgets\google\ColumnChart::class)
->dataSource(function($params, $scope) {
return $this->dashboard()->getSharedData()
->run()
->process(\koolreport\processes\Group::process([
'by' => 'dt',
'sum' => 'qtd_av',
'sum' => 'val_av'
]));
...
But, besides $this->dashboard() exists, it's null.
So I got 3 questions.
- Is it possible to passing a Dashboard widget directly to Level widget or to KWidget, the way we pass it to a Row or Panel?
- If 1 is not possible, how to communicate to and from koolreport chart and dashboard?
- If 1 is not possible, there is a way to, using the Dahboard KPI Products Demo as example, click on the chart and, instead of just reload the table, to get the action function to replace the table with another table or chart widget so we can mimic the drill down?