From 9ade2457749d4b22f728c8c34adf2010da347596 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 17 Mar 2023 20:12:38 +0100 Subject: [PATCH] Fix responsive --- htdocs/core/class/dolgraph.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index cfce9449f87..e2311c883d6 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -112,6 +112,11 @@ class DolGraph $this->datacolor = array(array(120, 130, 150), array(160, 160, 180), array(190, 190, 220)); $this->bgcolor = array(235, 235, 224); + // For small screen, we prefer a default with of 300 + if (!empty($conf->dol_optimize_smallscreen)) { + $this->width = 300; + } + // Load color of the theme $color_file = DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php'; if (is_readable($color_file)) {