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()
{
$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);
}

View file

@ -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);