PivotMatrix's serverPaging
property works with both Pivot and PivotSQL processes. When using in Dashboard, you can enable serverPaging
for PivotMatrix like this:
class CustomersPivotMatrix extends PivotMatrix
{
protected function dataSource()
{
return AutoMaker::table("customer_product_dollarsales2")
->select('customerName', 'productLine', 'productName','dollar_sales')
->run() //After run(), we will get DataStore, we continue to process data with ColumnMeta
->process(
ColumnMeta::process([
'dollar_sales'=>[
'type' => 'number',
'prefix' => '$',
'decimals'=>2,
],
])
)
;
}
protected function process()
{
return [
'dimensions'=>array(
...
),
'aggregates'=>array(
...
),
];
}
protected function display()
{
return [
'serverPaging' => true,
'paging' => true,
...
];
}
}
If there's any issue let us know. Rgds,