Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines
In the Value metric you use the actionSelect() to trigger the update of Category metric, and in the Category metric, you get the range of Value metric to query data. Something like this:
class MyValueMetric extends Metric
{
...
protected function actionSelect($request, $response)
{
//On the value select, you want to update the Category as well
$this->sibling("MyCategory")->update();
}
...
}
And here is what inside MyCategory
class MyCategory
{
protected function dataSource()
{
$range = $this->sibling("MyValueMetric")->selectedRange();
//You will get $range is array of start date and end date ['2021-01-01 00:00:00','2022-01-01 00:00:00']
//You apply to your query:
return AutoMaker::table("tableName")->whereBetween("dateColumnName",$range);
}
}
Hope that helps.
Let KoolReport help you to make great reports. It's free & open-source released under MIT license.
Download KoolReport View demo