Source
const do_add_max = labels_data.length === 0 || this.#config.max > labels_data[labels_data.length - 1].value;
/*
** 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 CSVGGauge {
static ZBX_STYLE_CLASS = 'svg-gauge';
static ZBX_STYLE_DESCRIPTION = 'svg-gauge-description';
static ZBX_STYLE_ARCS = 'svg-gauge-arcs';
static ZBX_STYLE_THRESHOLDS_ARC_SECTOR = 'svg-gauge-thresholds-arc-sector';
static ZBX_STYLE_VALUE_ARC_SECTOR = 'svg-gauge-value-arc-sector';
static ZBX_STYLE_EMPTY_ARC_SECTOR = 'svg-gauge-empty-arc-sector';
static ZBX_STYLE_NEEDLE = 'svg-gauge-needle';
static ZBX_STYLE_NEEDLE_LIGHT = 'svg-gauge-needle-light';
static ZBX_STYLE_NEEDLE_DARK = 'svg-gauge-needle-dark';
static ZBX_STYLE_LABEL = 'svg-gauge-label';
static ZBX_STYLE_LABEL_LEFT = 'svg-gauge-label-left';
static ZBX_STYLE_LABEL_RIGHT = 'svg-gauge-label-right';
static ZBX_STYLE_LABEL_CENTER = 'svg-gauge-label-center';
static ZBX_STYLE_VALUE_AND_UNITS = 'svg-gauge-value-and-units';
static ZBX_STYLE_VALUE = 'svg-gauge-value';
static ZBX_STYLE_UNITS = 'svg-gauge-units';
static ZBX_STYLE_NO_DATA = 'svg-gauge-no-data';
static SVG_NS = 'http://www.w3.org/2000/svg';
static LINE_HEIGHT = 1.14;
static TEXT_BASELINE = 0.8;
static CAPITAL_HEIGHT = 0.72;
static DESC_V_POSITION_TOP = 0;
static DESC_V_POSITION_BOTTOM = 1;
static UNITS_POSITION_BEFORE = 0;
static UNITS_POSITION_ABOVE = 1;
static UNITS_POSITION_AFTER = 2;
static UNITS_POSITION_BELOW = 3;
static SCALE_SIZE_DEFAULT = 10;
static ARCS_GAP = 2;
static DESCRIPTION_GAP = 4;
static LABEL_GAP = 40;
static NEEDLE_RADIUS = 6.5;