Source
protected function drawElement(&$data, $from, $to, $minX, $maxX, $minY, $maxY, $drawtype, $max_color, $avg_color, $min_color, $minmax_color, $calc_fnc, $yaxisside) {
<?php
/*
** Zabbix
** Copyright (C) 2001-2022 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;
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;
$this->percentile = [
GRAPH_YAXIS_SIDE_LEFT => [
'percent' => 0, // draw percentage line
'value' => 0 // calculated percentage value left y axis
],
GRAPH_YAXIS_SIDE_RIGHT => [
'percent' => 0, // draw percentage line
'value' => 0 // calculated percentage value right y axis
]
];
$this->outer = false;
$this->show_work_period = true;
$this->show_triggers = true;
$this->zero = [];