Source
'SELECT MAX(g.graphtype) AS graphtype,MIN(gi.yaxisside) AS yaxissidel,MAX(gi.yaxisside) AS yaxissider,MAX(g.height) AS height'.
<?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.
**/
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');
}
}
function graph_item_aggr_fnc2str($calc_fnc) {
switch ($calc_fnc) {
case AGGREGATE_NONE:
return _('none');
case AGGREGATE_MIN:
return _('min');
case AGGREGATE_MAX:
return _('max');
case AGGREGATE_AVG:
return _('avg');
case AGGREGATE_COUNT:
return _('count');
case AGGREGATE_SUM:
return _('sum');
case AGGREGATE_FIRST:
return _('first');
case AGGREGATE_LAST:
return _('last');
}
}