Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
lineargraph.php
1
<?php
2
3
namespace
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart
;
4
5
use
Bitrix\Main\Localization\Loc
;
6
11
class
LinearGraph
extends
Serial
12
{
13
const
VIEW_KEY
=
'linearGraph'
;
14
18
public
function
__construct
()
19
{
20
parent::__construct();
21
$this->
setLabel
(
Loc::getMessage
(
'REPORT_LINEAR_GRAPH_VIEW_LABEL'
));
22
$this->
setLogoUri
(
'/bitrix/images/report/visualconstructor/view-graph.jpg'
);
23
}
24
30
public
function
getCompatibleViewTypes
()
31
{
32
$viewTypes = parent::getCompatibleViewTypes();
33
$viewTypes[] =
'stack'
;
34
$viewTypes[] =
'smoothedLineGraph'
;
35
$viewTypes[] =
'column'
;
36
return
$viewTypes;
37
}
38
45
public
function
handlerFinallyBeforePassToView
($dataFromReport)
46
{
47
$result = parent::handlerFinallyBeforePassToView($dataFromReport);
48
$result[
'categoryAxis'
] += array(
49
'dashLength'
=> 1,
50
'minorGridEnabled'
=>
true
51
);
52
53
$isAllReportModeIsDate =
true
;
54
foreach
($dataFromReport as $report)
55
{
56
if
(!isset($report[
'config'
][
'mode'
]) && $report[
'config'
][
'mode'
] !==
'date'
)
57
{
58
$isAllReportModeIsDate =
false
;
59
break
;
60
}
61
}
62
$result[
'categoryAxis'
][
'parseDates'
] = $isAllReportModeIsDate;
63
64
if
(!empty($dataFromReport[0][
'config'
][
'categoryAxis'
][
'labelFrequency'
]))
65
{
66
$result[
'categoryAxis'
][
'labelFrequency'
] = $dataFromReport[0][
'config'
][
'categoryAxis'
][
'labelFrequency'
];
67
}
68
69
return
$result;
70
}
71
}
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\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\LinearGraph
Definition
lineargraph.php:12
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\LinearGraph\__construct
__construct()
Definition
lineargraph.php:18
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\LinearGraph\getCompatibleViewTypes
getCompatibleViewTypes()
Definition
lineargraph.php:30
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\LinearGraph\handlerFinallyBeforePassToView
handlerFinallyBeforePassToView($dataFromReport)
Definition
lineargraph.php:45
Bitrix\Report\VisualConstructor\Views\JsComponent\AmChart\LinearGraph\VIEW_KEY
const VIEW_KEY
Definition
lineargraph.php:13
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
lineargraph.php
Создано системой
1.10.0