Source
.selectAll(`.${CSVGPie.ZBX_STYLE_ARC_PLACEHOLDER}, .${CSVGPie.ZBX_STYLE_ARC_STROKE}, .${CSVGPie.ZBX_STYLE_ARC}`)
/*
** 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/>.
**/
class CSVGPie {
static ZBX_STYLE_CLASS = 'svg-pie-chart';
static ZBX_STYLE_ARCS = 'svg-pie-chart-arcs';
static ZBX_STYLE_ARC_CONTAINER = 'svg-pie-chart-arc-container';
static ZBX_STYLE_ARC_PLACEHOLDER = 'svg-pie-chart-arc-placeholder';
static ZBX_STYLE_ARC_STROKE = 'svg-pie-chart-arc-stroke';
static ZBX_STYLE_ARC = 'svg-pie-chart-arc';
static ZBX_STYLE_SPACE_CONTAINER = 'svg-pie-chart-space-container';
static ZBX_STYLE_SPACE = 'svg-pie-chart-space';
static ZBX_STYLE_ARC_NO_DATA_OUTER = 'svg-pie-chart-arc-no-data-outer';
static ZBX_STYLE_ARC_NO_DATA_INNER = 'svg-pie-chart-arc-no-data-inner';
static ZBX_STYLE_TOTAL_VALUE = 'svg-pie-chart-total-value';
static ZBX_STYLE_TOTAL_VALUE_NO_DATA = 'svg-pie-chart-total-value-no-data';
static TEXT_BASELINE = 0.8;
static ANIMATE_DURATION_WHOLE = 1000;
static ANIMATE_DURATION_POP_OUT = 300;
static ANIMATE_DURATION_POP_IN = 100;
static DRAW_TYPE_PIE = 0;
static DRAW_TYPE_DOUGHNUT = 1;
static TOTAL_VALUE_SIZE_DEFAULT = 20;
static TOTAL_VALUE_HEIGHT_MIN = 12;
static TOTAL_VALUE_PADDING = 10;
/**
* Widget configuration.
*
* @type {Object}
*/
#config;
/**
* Inner padding of the root SVG element.
*
* @type {Object}
*/
#padding;
/**
* Root SVG element.
*
* @type {SVGSVGElement}
* @member {Selection}
*/
#svg;
/**
* SVG group element implementing scaling and fitting of its contents inside the root SVG element.
*
* @type {SVGGElement}
* @member {Selection}
*/
#container;
/**
* SVG group element that contains all the sectors.
*
* @type {SVGGElement}
* @member {Selection}
*/
#arcs_container;
/**
* SVG group element that contains all the space elements between sectors.
*
* @type {SVGGElement}
* @member {Selection}
*/
#space_container;
/**
* SVG foreignObject element that contains total value and units.