Source
* Recalculate $this->shiftY property for graph according header label visibility settings and visibility of graph
<?php
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
abstract class CGraphDraw {
protected $stime;
protected $fullSizeX;
protected $fullSizeY;
protected $m_minY;
protected $m_maxY;
protected $data;
protected $items;
private $header;
protected $from_time;
protected $to_time;
private $colors;
protected $colorsrgb;
protected $im;
protected $period;
protected $sizeX;
protected $sizeY;
protected $shiftXleft;
protected $shiftXright;
protected $num;
protected $type;
protected $drawLegend;
protected $graphtheme;
protected $shiftY;
/**
* Default top padding including header label height and vertical padding.
*/
const DEFAULT_HEADER_PADDING_TOP = 36;
/**
* Default font size for header label text.
*/
const DEFAULT_HEADER_LABEL_FONT_SIZE = 11;
/**
* Default value for top and bottom padding.
*/
const DEFAULT_TOP_BOTTOM_PADDING = 12;
/**
* Header label visibility.
*/
public $draw_header = true;
/**
* Use top and bottom padding for graph image.
*/
public $with_vertical_padding = true;