Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
multidirectional.php
1
<?php
2
3
namespace
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
use
Bitrix\Report\VisualConstructor\Handler\BaseReport
;
7
8
16
class
MultiDirectional
extends
Serial
17
{
18
const
VIEW_KEY
=
'multiDirectional'
;
19
20
const
MAX_RENDER_REPORT_COUNT
= 2;
21
const
DEFAULT_EMPTY_REPORT_COUNT
= 2;
22
26
public
function
__construct
()
27
{
28
parent::__construct();
29
$this->
setLabel
(
Loc::getMessage
(
'REPORT_MULTI_LINEAR_GRAPH_VIEW_LABEL'
));
30
$this->
setLogoUri
(
'/bitrix/images/report/visualconstructor/view-multiple-direction.png'
);
31
}
32
39
public
function
handlerFinallyBeforePassToView
($dataFromReport)
40
{
41
$result = parent::handlerFinallyBeforePassToView($dataFromReport);
42
$result[
'categoryAxis'
] += array(
43
'dashLength'
=> 1,
44
'minorGridEnabled'
=>
true
45
);
46
$result[
'valueAxes'
] = array(
47
array(
48
"id"
=>
"v1"
,
49
"axisColor"
=>
"#FF6600"
,
50
"axisThickness"
=> 2,
51
"axisAlpha"
=> 1,
52
"position"
=>
"left"
53
),
54
array(
55
"id"
=>
"v2"
,
56
"axisColor"
=>
"#FFFCCC"
,
57
"axisThickness"
=> 2,
58
"axisAlpha"
=> 1,
59
"position"
=>
"right"
,
60
)
61
);
62
63
$isAllReportModeIsDate =
true
;
64
foreach
($dataFromReport as $key => $report)
65
{
66
if
(!isset($report[
'config'
][
'mode'
]) && $report[
'config'
][
'mode'
] !==
'date'
)
67
{
68
$isAllReportModeIsDate =
false
;
69
break
;
70
}
71
if
($report[
'config'
][
'reportColor'
])
72
{
73
$result[
'valueAxes'
][$key][
"axisColor"
] = $report[
'config'
][
'reportColor'
];
74
}
75
}
76
$result[
'categoryAxis'
][
'parseDates'
] = $isAllReportModeIsDate;
77
78
foreach
($result[
'graphs'
] as $key => &$graph)
79
{
80
$graph[
'valueAxis'
] = $result[
'valueAxes'
][$key][
'id'
];
81
}
82
return
$result;
83
}
84
91
public
function
collectReportHandlerFormElements
($reportHandler)
92
{
93
parent::collectReportHandlerFormElements($reportHandler);
94
$removeReportControlFormElement = $reportHandler->getFormElementByDataAttribute(
'role'
,
'report-remove-button'
);
95
if
($removeReportControlFormElement)
96
{
97
$reportHandler->removeFormElement($removeReportControlFormElement);
98
}
99
}
100
101
102
}
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Report\VisualConstructor\Handler\BaseReport
Definition
basereport.php:29
Bitrix\Report\VisualConstructor\View\setLogoUri
setLogoUri($logoUri)
Definition
view.php:102
Bitrix\Report\VisualConstructor\View\setLabel
setLabel($label)
Definition
view.php:83
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\MultiDirectional
Definition
multidirectional.php:17
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\MultiDirectional\__construct
__construct()
Definition
multidirectional.php:26
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\MultiDirectional\MAX_RENDER_REPORT_COUNT
const MAX_RENDER_REPORT_COUNT
Definition
multidirectional.php:20
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\MultiDirectional\handlerFinallyBeforePassToView
handlerFinallyBeforePassToView($dataFromReport)
Definition
multidirectional.php:39
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\MultiDirectional\DEFAULT_EMPTY_REPORT_COUNT
const DEFAULT_EMPTY_REPORT_COUNT
Definition
multidirectional.php:21
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\MultiDirectional\collectReportHandlerFormElements
collectReportHandlerFormElements($reportHandler)
Definition
multidirectional.php:91
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\MultiDirectional\VIEW_KEY
const VIEW_KEY
Definition
multidirectional.php:18
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\Serial
Definition
serial.php:14
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart
Definition
base.php:3
modules
report
lib
visualconstructor
views
jscomponent
amchart
multidirectional.php
Создано системой
1.10.0