The Category metric class has 2 options that seems to be doing nothing. I'm using it wrong?
use \koolreport\dashboard\metrics\Category;
use \koolreport\dashboard\fields\Text;
class ProductTopNCM extends Category
{
protected function onInit()
{
$this->title('Top 5 Products')
->helper('Need help!!!') // <-- Does nothing here and gives error if added to any field
->type('success')
->width(1/3)
->lazyLoading(true);
}
protected function dataSource()
{
return $this->dashboard()->getTpNcm();
}
protected function fields()
{
return [
$this->group(Text::create('ncm'))
->showTop(5)
->andShowOthers(),
$this->count(Text::create('ncm'))
->showRawValue(true) // <-- True or False, the value is still shown as percentage
];
}
}
But, besides show the raw value of the fields, I too would like to be able to "format" the content of chart mouseover tooltip, so I can add the details info of each category, that in my case, are too large sentences to be used diretcly on the category field. Is that possible?