Source
<?php declare(strict_types = 0);
/*
** 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/>.
**/
namespace Widgets\PieChart\Includes;
use CWidgetsData;
use Zabbix\Widgets\{
CWidgetField,
CWidgetForm
};
use Zabbix\Widgets\Fields\{
CWidgetFieldCheckBox,
CWidgetFieldColor,
CWidgetFieldIntegerBox,
CWidgetFieldMultiSelectOverrideHost,
CWidgetFieldRadioButtonList,
CWidgetFieldRangeControl,
CWidgetFieldTextBox,
CWidgetFieldTimePeriod
};
/**
* Pie chart widget form view.
*/
class WidgetForm extends CWidgetForm {
public const DATA_SOURCE_AUTO = 0;
public const DATA_SOURCE_HISTORY = 1;
public const DATA_SOURCE_TRENDS = 2;
public const DRAW_TYPE_DOUGHNUT = 1;
public const DRAW_TYPE_PIE = 0;
public const LEGEND_ON = 1;
public const LEGEND_COLUMNS_MAX = 4;
public const LEGEND_COLUMNS_MIN = 1;
public const LEGEND_LINES_MAX = 10;
public const LEGEND_LINES_MIN = 1;
public const LEGEND_LINES_MODE_FIXED = 0;
public const LEGEND_LINES_MODE_VARIABLE = 1;
public const MERGE_COLOR_DEFAULT = '768D99';
public const MERGE_PERCENT_MAX = 10;
public const MERGE_PERCENT_MIN = 1;