Fixing style errors.

This commit is contained in:
stickler-ci 2020-12-10 10:07:09 +00:00
parent ecd642e465
commit 38e03778dc

View File

@ -1142,7 +1142,6 @@ class DolGraph
$this->stringtoshow .= 'scales: { xAxes: [{ '; $this->stringtoshow .= 'scales: { xAxes: [{ ';
if ($isfunnel) { if ($isfunnel) {
$this->stringtoshow .= ' ticks: { beginAtZero: true}, display: false,'; $this->stringtoshow .= ' ticks: { beginAtZero: true}, display: false,';
} }
//$this->stringtoshow .= 'type: \'time\', '; // Need Moment.js //$this->stringtoshow .= 'type: \'time\', '; // Need Moment.js
$this->stringtoshow .= 'distribution: \'linear\''; $this->stringtoshow .= 'distribution: \'linear\'';
@ -1179,12 +1178,12 @@ class DolGraph
$i = 0; $i = 0;
if (!$isfunnel);{ if (!$isfunnel);{
foreach ($legends as $val) // Loop on each serie foreach ($legends as $val) // Loop on each serie
{ {
if ($i > 0) $this->stringtoshow .= ', '; if ($i > 0) $this->stringtoshow .= ', ';
$this->stringtoshow .= "'".dol_escape_js(dol_trunc($val, 32))."'"; $this->stringtoshow .= "'".dol_escape_js(dol_trunc($val, 32))."'";
$i++; $i++;
} }
} }
//var_dump($arrayofgroupslegend); //var_dump($arrayofgroupslegend);
@ -1271,17 +1270,16 @@ class DolGraph
if ($isfunnel){ if ($isfunnel){
$this->stringtoshow .= 'borderWidth: \'2\', '; $this->stringtoshow .= 'borderWidth: \'2\', ';
} }
else if ($type == 'bar' || $type == 'horizontalBar') { elseif ($type == 'bar' || $type == 'horizontalBar') {
$this->stringtoshow .= 'borderWidth: \'1\', '; $this->stringtoshow .= 'borderWidth: \'1\', ';
} }
$this->stringtoshow .= 'borderColor: \'' . $bordercolor . '\', '; $this->stringtoshow .= 'borderColor: \'' . $bordercolor . '\', ';
$this->stringtoshow .= 'backgroundColor: \'' . $color . '\', '; $this->stringtoshow .= 'backgroundColor: \'' . $color . '\', ';
if ($arrayofgroupslegend[$i]) $this->stringtoshow .= 'stack: \'' . $arrayofgroupslegend[$i]['stacknum'] . '\', '; if ($arrayofgroupslegend[$i]) $this->stringtoshow .= 'stack: \'' . $arrayofgroupslegend[$i]['stacknum'] . '\', ';
$this->stringtoshow .='data: ['; $this->stringtoshow .='data: [';
if($isfunnel){ if ($isfunnel){
$this->stringtoshow .= '['.-$serie[$i].','.$serie[$i].']'; $this->stringtoshow .= '['.-$serie[$i].','.$serie[$i].']';
}else {
}else{
$this->stringtoshow .= $serie[$i]; $this->stringtoshow .= $serie[$i];
} }
$this->stringtoshow .=']'; $this->stringtoshow .=']';