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)) {