Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
stack.php
1<?php
2
4
6
11class Stack extends Column
12{
13 const VIEW_KEY = 'stack';
14
15
19 public function __construct()
20 {
21 parent::__construct();
22 $this->setLabel(Loc::getMessage('REPORT_STACK_VIEW_LABEL'));
23 $this->setLogoUri('/bitrix/images/report/visualconstructor/view-bar-stack.jpg');
24 }
25
31 public function getCompatibleViewTypes()
32 {
33 $viewTypes = parent::getCompatibleViewTypes();
34 $viewTypes[] = 'smoothedLineGraph';
35 $viewTypes[] = 'linearGraph';
36 $viewTypes[] = 'column';
37 return $viewTypes;
38 }
39
46 public function handlerFinallyBeforePassToView($dataFromReport)
47 {
48 $result = parent::handlerFinallyBeforePassToView($dataFromReport);
49
50 foreach ($result['dataProvider'] as &$data)
51 {
52 foreach ($data as $valueKey => $value)
53 {
54 if (mb_strpos($valueKey, 'value_') === 0 && $value === 0)
55 {
56 unset($data[$valueKey]);
57 }
58 }
59 }
60
61
62 $result['valueAxes'][0] = array(
63 'stackType' => "regular",
64 'axisAlpha' => 0,
65 'gridAlpha' => 0
66 );
67 return $result;
68 }
69}
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29