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)
->groupBy('tx_tracking_pageview.pid')
->orderBy('total', 'desc')
->setMaxResults(6) // Because 6 colors are defined
->setMaxResults($this->settings['maxResults'])
->execute()
->fetchAll();

View file

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