From eaf8a97bed8e057db3183582decc2b7bb47d2b8d Mon Sep 17 00:00:00 2001 From: Sergei Solovev Date: Sun, 3 Dec 2023 18:28:06 +0300 Subject: [PATCH] Fixed graphs --- system/library/games/graph/pData.php | 4 ++-- system/library/games/graph/pDraw.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/system/library/games/graph/pData.php b/system/library/games/graph/pData.php index 53f11c2..0fb5865 100644 --- a/system/library/games/graph/pData.php +++ b/system/library/games/graph/pData.php @@ -43,7 +43,7 @@ class pData function pData() { - $this->Data = ''; + $this->Data = array(); $this->Data['XAxisDisplay'] = AXIS_FORMAT_DEFAULT; $this->Data['XAxisFormat'] = NULL; $this->Data['XAxisName'] = NULL; @@ -937,7 +937,7 @@ class pData function convertToArray($Value) { - $Values = ''; + $Values = array(); $Values[] = $Value; return ($Values); } diff --git a/system/library/games/graph/pDraw.php b/system/library/games/graph/pDraw.php index f745983..9028978 100644 --- a/system/library/games/graph/pDraw.php +++ b/system/library/games/graph/pDraw.php @@ -2134,6 +2134,7 @@ class pDraw $Boundaries["B"] = $BoxArray[1]["Y"] + 2 + $IconAreaHeight / 2; } + $Width = array(); $Width[] = $BoxArray[1]["X"]; } @@ -2206,6 +2207,7 @@ class pDraw $Width = ""; 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)); + $Width = array(); $Width[] = $BoxArray[1]["X"]; } $X = max($Width) + 2 + $XStep; @@ -3902,6 +3904,7 @@ class pDraw } } } else { + $Result = array(); foreach ($Values as $Key => $Value) { if ($Value == VOID) { $Result[] = VOID; @@ -4481,6 +4484,7 @@ class pDraw $this->drawLine($LastGoodX, $LastGoodY, $X, $Y, $BreakSettings); } + $WayPoints = array(); if ($Y != VOID) $WayPoints[] = array($X, $Y);