%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 3.14.244.41 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/modules/report/lib/visualconstructor/views/jscomponent/amchart/ |
Upload File : |
<?php namespace Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart; use Bitrix\Main\Localization\Loc; use Bitrix\Report\VisualConstructor\Handler\BaseReport; /** * Class MultiDirectional. * Construct 2 directional linear graph, * First report in first direction, second in second sdirection. * * @package Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart */ class MultiDirectional extends Serial { const VIEW_KEY = 'multiDirectional'; const MAX_RENDER_REPORT_COUNT = 2; const DEFAULT_EMPTY_REPORT_COUNT = 2; /** * Multidirecional graoph constructor. */ public function __construct() { parent::__construct(); $this->setLabel(Loc::getMessage('REPORT_MULTI_LINEAR_GRAPH_VIEW_LABEL')); $this->setLogoUri('/bitrix/images/report/visualconstructor/view-multiple-direction.png'); } /** * Handle all data prepared for this view. * * @param array $dataFromReport Parameters prepared in report handlers. * @return array */ public function handlerFinallyBeforePassToView($dataFromReport) { $result = parent::handlerFinallyBeforePassToView($dataFromReport); $result['categoryAxis'] += array( 'dashLength' => 1, 'minorGridEnabled' => true ); $result['valueAxes'] = array( array( "id" => "v1", "axisColor" => "#FF6600", "axisThickness" => 2, "axisAlpha" => 1, "position" => "left" ), array( "id" => "v2", "axisColor" => "#FFFCCC", "axisThickness" => 2, "axisAlpha" => 1, "position" => "right", ) ); $isAllReportModeIsDate = true; foreach ($dataFromReport as $key => $report) { if (!isset($report['config']['mode']) && $report['config']['mode'] !== 'date') { $isAllReportModeIsDate = false; break; } if ($report['config']['reportColor']) { $result['valueAxes'][$key]["axisColor"] = $report['config']['reportColor']; } } $result['categoryAxis']['parseDates'] = $isAllReportModeIsDate; foreach ($result['graphs'] as $key => &$graph) { $graph['valueAxis'] = $result['valueAxes'][$key]['id']; } return $result; } /** * Method to modify widget form elements. * * @param BaseReport $reportHandler Widget handler. * @return void */ public function collectReportHandlerFormElements($reportHandler) { parent::collectReportHandlerFormElements($reportHandler); $removeReportControlFormElement = $reportHandler->getFormElementByDataAttribute('role', 'report-remove-button'); if ($removeReportControlFormElement) { $reportHandler->removeFormElement($removeReportControlFormElement); } } }