<?php
 namespace App\QuickReports\Charts\Types; class Pie extends MultiDataSetsAbstract { public function addGroupingField($groupingField, $orderField, $orderAggregateFunction, $orderDirection, $limit = 0, $showOthers = false) { if ($this->groupingFields and count($this->groupingFields)>=1) { throw new \Exception('You cannot set more than 1 grouping field for this type of chart.'); } return parent::addGroupingField($groupingField, $orderField, $orderAggregateFunction, $orderDirection, $limit, $showOthers); } } 