From be0e13416cf178fd15a3a38d37b312fc0ac42577 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Wed, 1 Apr 2020 11:38:09 +0200 Subject: [PATCH] Truncate page title for graph In order to not break layout. --- Classes/Dashboard/Widgets/PageViewsPerPageDoughnut.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Dashboard/Widgets/PageViewsPerPageDoughnut.php b/Classes/Dashboard/Widgets/PageViewsPerPageDoughnut.php index fd2a0ed..46d6ec2 100644 --- a/Classes/Dashboard/Widgets/PageViewsPerPageDoughnut.php +++ b/Classes/Dashboard/Widgets/PageViewsPerPageDoughnut.php @@ -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']; }