dolgrap.class.php with frederic34 advices 2

This commit is contained in:
lmarcouiller 2021-01-19 09:43:06 +01:00
parent d69e36c110
commit afab5a977a
2 changed files with 12 additions and 15 deletions

View File

@ -230,18 +230,18 @@ class box_funnel_of_prospection extends ModeleBoxes
$dolgraph->SetMinValue(0); $dolgraph->SetMinValue(0);
$dolgraph->SetData($dataseries); $dolgraph->SetData($dataseries);
$dolgraph->SetLegend($liststatus); $dolgraph->SetLegend($liststatus);
$dolgraph->SetHideXValues(true); $dolgraph->setHideXValues(true);
$dolgraph->SetDataColor(array_values($colorseriesstat)); $dolgraph->SetDataColor(array_values($colorseriesstat));
$dolgraph->SetBorderColor(array_values($bordercolorseries)); $dolgraph->setBorderColor(array_values($bordercolorseries));
$dolgraph->setShowLegend(2); $dolgraph->setShowLegend(2);
$dolgraph->setShowPercent(1); $dolgraph->setShowPercent(1);
$dolgraph->SetMirrorGraphValues(true); $dolgraph->setMirrorGraphValues(true);
$dolgraph->SetBorderWidth(2); $dolgraph->setBorderWidth(2);
$dolgraph->SetType(array('horizontalbars')); $dolgraph->SetType(array('horizontalbars'));
$dolgraph->SetHeight('200'); $dolgraph->SetHeight('200');
$dolgraph->SetWidth('600'); $dolgraph->SetWidth('600');
$dolgraph->SetTooltipsTitles($liststatus); $dolgraph->setTooltipsTitles($liststatus);
$dolgraph->SetTooltipsLabels($customlabels); $dolgraph->setTooltipsLabels($customlabels);
$dolgraph->mode = 'depth'; $dolgraph->mode = 'depth';
$dolgraph->draw('idgraphleadfunnel'); $dolgraph->draw('idgraphleadfunnel');
$stringtoprint .= $dolgraph->show($totaloppnb ? 0 : 1); $stringtoprint .= $dolgraph->show($totaloppnb ? 0 : 1);

View File

@ -189,9 +189,8 @@ class DolGraph
* @param boolean $bool XValues or not * @param boolean $bool XValues or not
* @return boolean true * @return boolean true
*/ */
public function SetHideXValues($bool) public function setHideXValues($bool)
{ {
// phpcs:enable
$this->hideXValues = $bool; $this->hideXValues = $bool;
return true; 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','#......'...) * @param array $bordercolor Border Color array(array(R,G,B),array(R,G,B)...) or array('#FFFFFF','#......'...)
* @return void * @return void
*/ */
public function SetBorderColor($bordercolor) public function setBorderColor($bordercolor)
{ {
$this->bordercolor = $bordercolor; $this->bordercolor = $bordercolor;
} }
@ -293,7 +292,7 @@ class DolGraph
* @param int $borderwidth Border Width * @param int $borderwidth Border Width
* @return void * @return void
*/ */
public function SetBorderWidth($borderwidth) public function setBorderWidth($borderwidth)
{ {
$this->borderwidth = $borderwidth; $this->borderwidth = $borderwidth;
} }
@ -304,9 +303,8 @@ class DolGraph
* @param array $tooltipsLabels Tooltips Labels array('...','...'...) * @param array $tooltipsLabels Tooltips Labels array('...','...'...)
* @return void * @return void
*/ */
public function SetTooltipsLabels($tooltipsLabels) public function setTooltipsLabels($tooltipsLabels)
{ {
// phpcs:enable
$this->tooltipsLabels = $tooltipsLabels; $this->tooltipsLabels = $tooltipsLabels;
} }
@ -316,9 +314,8 @@ class DolGraph
* @param array $tooltipsTitles Tooltips Titles array('...','...'...) * @param array $tooltipsTitles Tooltips Titles array('...','...'...)
* @return void * @return void
*/ */
public function SetTooltipsTitles($tooltipsTitles) public function setTooltipsTitles($tooltipsTitles)
{ {
// phpcs:enable
$this->tooltipsTitles = $tooltipsTitles; $this->tooltipsTitles = $tooltipsTitles;
} }
@ -481,7 +478,7 @@ class DolGraph
* @param boolean $mirrorGraphValues Mirror Values if true and doesn't if false * @param boolean $mirrorGraphValues Mirror Values if true and doesn't if false
* @return void * @return void
*/ */
public function SetMirrorGraphValues($mirrorGraphValues) public function setMirrorGraphValues($mirrorGraphValues)
{ {
$this->mirrorGraphValues = $mirrorGraphValues; $this->mirrorGraphValues = $mirrorGraphValues;
} }