Is it possible to change Category labels at PHP level?
I tried to:
use \koolreport\dashboard\metrics\Category;
...
protected function fields()
{
return [
$this->group(
Text::create("productLine")->customRender(function($val) {
return ($val == "Something")? "Stuff" : $val;
})
)->showTop(3)
->andShowOthers("Others"),
$this->sum(Number::create("quantityInStock"))
];
}
but didn´t work.
Also, whats the difference between customRender and formatUsing?