Source
protected function drawElement(&$data, $from, $to, $drawtype, $max_color, $avg_color, $min_color, $minmax_color, $calc_fnc, $yaxisside) {
<?php
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
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 $is_binary;
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;