Fixed graphs

This commit is contained in:
Sergei Solovev 2023-12-03 18:28:06 +03:00
parent a43402dee8
commit eaf8a97bed
2 changed files with 6 additions and 2 deletions

View file

@ -43,7 +43,7 @@ class pData
function pData() function pData()
{ {
$this->Data = ''; $this->Data = array();
$this->Data['XAxisDisplay'] = AXIS_FORMAT_DEFAULT; $this->Data['XAxisDisplay'] = AXIS_FORMAT_DEFAULT;
$this->Data['XAxisFormat'] = NULL; $this->Data['XAxisFormat'] = NULL;
$this->Data['XAxisName'] = NULL; $this->Data['XAxisName'] = NULL;
@ -937,7 +937,7 @@ class pData
function convertToArray($Value) function convertToArray($Value)
{ {
$Values = ''; $Values = array();
$Values[] = $Value; $Values[] = $Value;
return ($Values); return ($Values);
} }

View file

@ -2134,6 +2134,7 @@ class pDraw
$Boundaries["B"] = $BoxArray[1]["Y"] + 2 + $IconAreaHeight / 2; $Boundaries["B"] = $BoxArray[1]["Y"] + 2 + $IconAreaHeight / 2;
} }
$Width = array();
$Width[] = $BoxArray[1]["X"]; $Width[] = $BoxArray[1]["X"];
} }
@ -2206,6 +2207,7 @@ class pDraw
$Width = ""; $Width = "";
foreach ($Lines as $Key => $Value) { foreach ($Lines as $Key => $Value) {
$BoxArray = $this->drawText($X + $IconAreaWidth + 4, $Y + $IconAreaHeight / 2 + (($this->FontSize + 3) * $Key), $Value, array("R" => $FontR, "G" => $FontG, "B" => $FontB, "Align" => TEXT_ALIGN_MIDDLELEFT, "FontSize" => $FontSize, "FontName" => $FontName)); $BoxArray = $this->drawText($X + $IconAreaWidth + 4, $Y + $IconAreaHeight / 2 + (($this->FontSize + 3) * $Key), $Value, array("R" => $FontR, "G" => $FontG, "B" => $FontB, "Align" => TEXT_ALIGN_MIDDLELEFT, "FontSize" => $FontSize, "FontName" => $FontName));
$Width = array();
$Width[] = $BoxArray[1]["X"]; $Width[] = $BoxArray[1]["X"];
} }
$X = max($Width) + 2 + $XStep; $X = max($Width) + 2 + $XStep;
@ -3902,6 +3904,7 @@ class pDraw
} }
} }
} else { } else {
$Result = array();
foreach ($Values as $Key => $Value) { foreach ($Values as $Key => $Value) {
if ($Value == VOID) { if ($Value == VOID) {
$Result[] = VOID; $Result[] = VOID;
@ -4481,6 +4484,7 @@ class pDraw
$this->drawLine($LastGoodX, $LastGoodY, $X, $Y, $BreakSettings); $this->drawLine($LastGoodX, $LastGoodY, $X, $Y, $BreakSettings);
} }
$WayPoints = array();
if ($Y != VOID) if ($Y != VOID)
$WayPoints[] = array($X, $Y); $WayPoints[] = array($X, $Y);