Source
protected function drawElement(&$data, $from, $to, $drawtype, $max_color, $avg_color, $min_color, $minmax_color, $calc_fnc, $yaxisside) {
<?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/>.
**/
class CLineGraphDraw extends CGraphDraw {
const GRAPH_WIDTH_MIN = 20;
const GRAPH_HEIGHT_MIN = 20;
const LEGEND_OFFSET_Y = 90;
private $cell_height_min;
private $cell_width;
private $drawExLegend;
private $drawItemsLegend;
private $intervals;
private $itemsHost;
private $outer;
private $oxy;
private $percentile;
private $power;
private $show_triggers;
private $show_work_period;
private $triggers;
private $unit2px;
private $yaxis;
private $yaxismin;
private $yaxismax;
private $ymin_itemid;
private $ymax_itemid;
private $ymin_type;
private $ymax_type;
private $zero;
public function __construct($type = GRAPH_TYPE_NORMAL) {
parent::__construct($type);
$this->triggers = [];
$this->yaxis = [
GRAPH_YAXIS_SIDE_LEFT => false,
GRAPH_YAXIS_SIDE_RIGHT => false
];
$this->ymin_type = GRAPH_YAXIS_TYPE_CALCULATED;
$this->ymax_type = GRAPH_YAXIS_TYPE_CALCULATED;
$this->yaxismin = null;
$this->yaxismax = null;
$this->ymin_itemid = 0;
$this->ymax_itemid = 0;