I'm having 2 difficulties with Category.
1- When formating the Number field it will show right in the list but not in the total above. ("." and "," at list aginst "," and "." at total)
2- When applying Filter, the graph is going crazy. If I take out the Filter::process, the graph will show right.
Here we can see 1 and 2 happening:
Code:
class ProductTopNCM extends Category
{
protected function onInit()
{
$this->title(Lang::t('Top 5 NCM Cat.'))
->type('success')
->width(1/3)
->lazyLoading(true);
}
protected function dataSource()
{
return $this->dashboard()->getDataG1()
->run()
->process(\koolreport\processes\Filter::process([
['ncm', '!=', '.0']
]));
}
protected function fields()
{
return [
$this->group(Text::create('ncm'))->showTop(5)->andShowOthers(),
$this->sum(Number::create('qtd_ncm'))->showRawValue(true)->suffix('')->decimals(0)->decimalPoint(Lang::t('.'))->thousandSeparator(Lang::t(',')),
];
}
}