From afab5a977a0b579ef97cbe469c5c5f54c353945a Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Tue, 19 Jan 2021 09:43:06 +0100 Subject: [PATCH] dolgrap.class.php with frederic34 advices 2 --- htdocs/core/boxes/box_funnel_of_prospection.php | 12 ++++++------ htdocs/core/class/dolgraph.class.php | 15 ++++++--------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php index 6d8acdb52bd..519cb2cd306 100644 --- a/htdocs/core/boxes/box_funnel_of_prospection.php +++ b/htdocs/core/boxes/box_funnel_of_prospection.php @@ -230,18 +230,18 @@ class box_funnel_of_prospection extends ModeleBoxes $dolgraph->SetMinValue(0); $dolgraph->SetData($dataseries); $dolgraph->SetLegend($liststatus); - $dolgraph->SetHideXValues(true); + $dolgraph->setHideXValues(true); $dolgraph->SetDataColor(array_values($colorseriesstat)); - $dolgraph->SetBorderColor(array_values($bordercolorseries)); + $dolgraph->setBorderColor(array_values($bordercolorseries)); $dolgraph->setShowLegend(2); $dolgraph->setShowPercent(1); - $dolgraph->SetMirrorGraphValues(true); - $dolgraph->SetBorderWidth(2); + $dolgraph->setMirrorGraphValues(true); + $dolgraph->setBorderWidth(2); $dolgraph->SetType(array('horizontalbars')); $dolgraph->SetHeight('200'); $dolgraph->SetWidth('600'); - $dolgraph->SetTooltipsTitles($liststatus); - $dolgraph->SetTooltipsLabels($customlabels); + $dolgraph->setTooltipsTitles($liststatus); + $dolgraph->setTooltipsLabels($customlabels); $dolgraph->mode = 'depth'; $dolgraph->draw('idgraphleadfunnel'); $stringtoprint .= $dolgraph->show($totaloppnb ? 0 : 1); diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 03d6efd8740..0e5e42331db 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -189,9 +189,8 @@ class DolGraph * @param boolean $bool XValues or not * @return boolean true */ - public function SetHideXValues($bool) + public function setHideXValues($bool) { - // phpcs:enable $this->hideXValues = $bool; return true; } @@ -282,7 +281,7 @@ class DolGraph * @param array $bordercolor Border Color array(array(R,G,B),array(R,G,B)...) or array('#FFFFFF','#......'...) * @return void */ - public function SetBorderColor($bordercolor) + public function setBorderColor($bordercolor) { $this->bordercolor = $bordercolor; } @@ -293,7 +292,7 @@ class DolGraph * @param int $borderwidth Border Width * @return void */ - public function SetBorderWidth($borderwidth) + public function setBorderWidth($borderwidth) { $this->borderwidth = $borderwidth; } @@ -304,9 +303,8 @@ class DolGraph * @param array $tooltipsLabels Tooltips Labels array('...','...'...) * @return void */ - public function SetTooltipsLabels($tooltipsLabels) + public function setTooltipsLabels($tooltipsLabels) { - // phpcs:enable $this->tooltipsLabels = $tooltipsLabels; } @@ -316,9 +314,8 @@ class DolGraph * @param array $tooltipsTitles Tooltips Titles array('...','...'...) * @return void */ - public function SetTooltipsTitles($tooltipsTitles) + public function setTooltipsTitles($tooltipsTitles) { - // phpcs:enable $this->tooltipsTitles = $tooltipsTitles; } @@ -481,7 +478,7 @@ class DolGraph * @param boolean $mirrorGraphValues Mirror Values if true and doesn't if false * @return void */ - public function SetMirrorGraphValues($mirrorGraphValues) + public function setMirrorGraphValues($mirrorGraphValues) { $this->mirrorGraphValues = $mirrorGraphValues; }