24 parent::__construct();
38 $result = parent::handlerFinallyBeforePassToView($dataFromReport);
41 'maskBullets' =>
false,
47 "type" =>
"CategoryAxis",
49 "category" =>
"groupingField"
58 "ellipsis" =>
"…",
59 "fixedWidthGrid" =>
true,
60 "horizontalCenter" =>
"middle",
62 "tooltipText" =>
"{category}"
69 "type" =>
"ValueAxis",
75 foreach ($dataFromReport as $data)
78 if (isset($data[
'items']))
80 foreach ($data[
'items'] as $key => $res)
82 if (!isset($result[
'data'][$res[
'groupBy']]))
84 $result[
'data'][$res[
'groupBy']] = [
85 'groupingField' => $data[
'config'][
'groupsLabelMap'][$res[
'groupBy']] ??
'-',
88 $result[
'data'][$res[
'groupBy']][
'value_'.$reportCount] = $res[
'value'];
92 $result[
'data'][$res[
'groupBy']][
'label_'.$reportCount] = $res[
'label'];
94 if ($res[
'targetUrl'])
96 $result[
'data'][$res[
'groupBy']][
'targetUrl_'.$reportCount] = $res[
'targetUrl'];
101 $balloon = $result[
'data'][$res[
'groupBy']][
'balloon'] ?: [];
102 $result[
'data'][$res[
'groupBy']][
'balloon'] = array_merge($balloon, $res[
'balloon']);
109 "valueY" =>
'value_'.$reportCount,
110 "categoryX" =>
"groupingField"
113 "fill" => $data[
'config'][
'reportColor'],
115 "propertyFields" => [
119 "valueUrl" =>
"targetUrl_1",
122 "tooltipText" => htmlspecialcharsbx($data[
"config"][
"reportTitle"]) .
" {valueY}",
126 "background" => [
"disabled" =>
true],
129 "type" =>
"DropShadowFilter",
136 $result[
'series'][] = $series;
140 if (static::ENABLE_SORTING)
142 ksort($result[
'data']);
145 $result[
'data'] = array_values($result[
'data']);
157 parent::collectReportHandlerFormElements($reportHandler);
159 $whatWillCalculateField = $reportHandler->getFormElement(
'calculate');
160 $labelField = $reportHandler->getFormElement(
'label');
161 if ($whatWillCalculateField)
163 $labelField->addJsEventListener($whatWillCalculateField, $whatWillCalculateField::JS_EVENT_ON_CHANGE, array(
164 'class' =>
'BX.Report.VisualConstructor.FieldEventHandlers.Title',
165 'action' =>
'whatWillCalculateChange',
167 $whatWillCalculateField->addAssets(array(
168 'js' => array(
'/bitrix/js/report/js/visualconstructor/fields/reporttitle.js')