From d056abc4e1264abf61840d2720382365a5624bda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 13 Mar 2015 21:45:52 +0100 Subject: [PATCH] No need to have this protected. Property can be read with method show() and this method can be override. --- htdocs/core/class/dolgraph.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 5451d7457ce..0dca02cbc2d 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -65,7 +65,7 @@ class DolGraph var $bgcolorgrid=array(255,255,255); // array(R,G,B) var $datacolor; // array(array(R,G,B),...) - protected $_stringtoshow; // To store string to output graph into HTML page + private $_stringtoshow; // To store string to output graph into HTML page /** @@ -935,16 +935,16 @@ class DolGraph opacity: 0.80 }).appendTo("body").fadeIn(20); } - + var previousPoint = null; $("#placeholder_'.$tag.'").bind("plothover", function (event, pos, item) { $("#x").text(pos.x.toFixed(2)); $("#y").text(pos.y.toFixed(2)); - + if (item) { if (previousPoint != item.dataIndex) { previousPoint = item.dataIndex; - + $("#tooltip").remove(); /* console.log(item); */ var x = item.datapoint[0].toFixed(2); @@ -1022,7 +1022,7 @@ class DolGraph return $this->_stringtoshow; } - + /** * getDefaultGraphSizeForStats * @@ -1033,18 +1033,18 @@ class DolGraph static function getDefaultGraphSizeForStats($direction,$defaultsize='') { global $conf; - + if ($direction == 'width') { if (empty($conf->dol_optimize_smallscreen)) return ($defaultsize ? $defaultsize : '500'); else return (empty($_SESSION['dol_screen_width']) ? '280' : ($_SESSION['dol_screen_width']-40)); } - if ($direction == 'height') + if ($direction == 'height') { return (empty($conf->dol_optimize_smallscreen)?($defaultsize?$defaultsize:'200'):'160'); } return 0; } - + }