Make max results of doughnut graph configurable

This commit is contained in:
Daniel Siepmann 2020-02-26 22:57:50 +01:00
parent e237941e07
commit db2b0e13ed
2 changed files with 2 additions and 1 deletions

View file

@ -104,7 +104,7 @@ class PageViewsPerPageDoughnut extends AbstractDoughnutChartWidget
->where(... $constraints) ->where(... $constraints)
->groupBy('tx_tracking_pageview.pid') ->groupBy('tx_tracking_pageview.pid')
->orderBy('total', 'desc') ->orderBy('total', 'desc')
->setMaxResults(6) // Because 6 colors are defined ->setMaxResults($this->settings['maxResults'])
->execute() ->execute()
->fetchAll(); ->fetchAll();

View file

@ -29,6 +29,7 @@ class SettingsFactory
'pageViewsBar' => [ 'pageViewsBar' => [
'periodInDays' => 31, 'periodInDays' => 31,
'blackListedPages' => [], 'blackListedPages' => [],
'maxResults' => 6,
], ],
'pageViewsPerPageDoughnut' => [ 'pageViewsPerPageDoughnut' => [
'periodInDays' => 31, 'periodInDays' => 31,