-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Labels
Description
Currently, there is no "avg" for table totals. Implementation would be easy, I can take care of it when I update to current versions. Code is quite finished:
- new property
avgCountfor table:$this->avgCount = 0; - that code in updateTotals:
case 'avg':
if($this->model[$key] !== null) { //only use non null values for sensible average calculation
$this->totals[$key] = (($this->totals[$key] * $this->avgCount) + $this->model[$key]) / ($this->avgCount + 1);
$this->avgCount++;
}
break;