Truncate page title for graph

In order to not break layout.
This commit is contained in:
Daniel Siepmann 2020-04-01 11:38:09 +02:00
parent b19eb00329
commit be0e13416c
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4

View file

@ -109,7 +109,7 @@ class PageViewsPerPageDoughnut extends AbstractDoughnutChartWidget
->fetchAll();
foreach ($result as $row) {
$labels[] = $row['title'] . ' [' . $row['uid'] . ']';
$labels[] = mb_strimwidth($row['title'], 0, 50, '…') . ' [' . $row['uid'] . ']';
$data[] = $row['total'];
}