Source
'SELECT MAX(g.graphtype) AS graphtype,MIN(gi.yaxisside) AS yaxissidel,MAX(gi.yaxisside) AS yaxissider,MAX(g.height) AS height'.
<?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/>.
**/
function graphType($type = null) {
$types = [
GRAPH_TYPE_NORMAL => _('Normal'),
GRAPH_TYPE_STACKED => _('Stacked'),
GRAPH_TYPE_PIE => _('Pie'),
GRAPH_TYPE_EXPLODED => _('Exploded')
];
if (is_null($type)) {
return $types;
}
elseif (isset($types[$type])) {
return $types[$type];
}
else {
return _('Unknown');
}
}
function graph_item_drawtypes() {
return [
GRAPH_ITEM_DRAWTYPE_LINE,
GRAPH_ITEM_DRAWTYPE_FILLED_REGION,
GRAPH_ITEM_DRAWTYPE_BOLD_LINE,
GRAPH_ITEM_DRAWTYPE_DOT,
GRAPH_ITEM_DRAWTYPE_DASHED_LINE,
GRAPH_ITEM_DRAWTYPE_GRADIENT_LINE
];
}
function graph_item_drawtype2str($drawtype) {
switch ($drawtype) {
case GRAPH_ITEM_DRAWTYPE_LINE:
return _('Line');
case GRAPH_ITEM_DRAWTYPE_FILLED_REGION:
return _('Filled region');
case GRAPH_ITEM_DRAWTYPE_BOLD_LINE:
return _('Bold line');
case GRAPH_ITEM_DRAWTYPE_DOT:
return _('Dot');
case GRAPH_ITEM_DRAWTYPE_DASHED_LINE:
return _('Dashed line');
case GRAPH_ITEM_DRAWTYPE_GRADIENT_LINE:
return _('Gradient line');
default:
return _('Unknown');
}