From af1bb093383bb4b46b6b4d9030acf31cc58f34e0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 4 Dec 2020 22:30:34 +0100 Subject: [PATCH] NEW: Graphics can be horizontal bars. --- ChangeLog | 1 + htdocs/core/class/dolgraph.class.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d0fd358c2b..7b685eb3381 100644 --- a/ChangeLog +++ b/ChangeLog @@ -216,6 +216,7 @@ NEW: add a message in error_log after detection of SQL or script injection NEW: add __TYPE__ substitution key NEW: add validation of MX domain for emails NEW: calculate the virtual stock in transverse mode ( not on getEntity('commande'), ... but on getEntity('stock') ) +NEW: Graphics can be horizontal bars. HOOKs NEW: Hook on propal card diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 1f5cc82825e..80314bcf9ed 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -39,7 +39,7 @@ */ class DolGraph { - public $type = array(); // Array with type of each series. Example: array('bars', 'lines', ...) + public $type = array(); // Array with type of each series. Example: array('bars', 'horizontalbars', 'lines', 'pies', 'piesemicircle', 'polar'...) public $mode = 'side'; // Mode bars graph: side, depth private $_library = 'chart'; // Graphic library to use (jflot, chart, artichow) @@ -261,7 +261,7 @@ class DolGraph * Set type * * @param array $type Array with type for each serie. Example: array('type1', 'type2', ...) where type can be: - * 'pie', 'piesemicircle', 'polar', 'lines', 'linesnopoint', 'bars', ... + * 'pie', 'piesemicircle', 'polar', 'lines', 'linesnopoint', 'bars', 'horirontalbars'... * @return void */ public function SetType($type) @@ -1156,6 +1156,7 @@ class DolGraph else { $type = 'bar'; if (!isset($this->type[$firstlot]) || $this->type[$firstlot] == 'bars') $type = 'bar'; + if (isset($this->type[$firstlot]) && $this->type[$firstlot] == 'horizontalbars') $type = 'horizontalBar'; if (isset($this->type[$firstlot]) && ($this->type[$firstlot] == 'lines' || $this->type[$firstlot] == 'linesnopoint')) $type = 'line'; $this->stringtoshow .= 'var options = { maintainAspectRatio: false, aspectRatio: 2.5, ';