• Модуль: report
  • Путь к файлу: ~/bitrix/modules/report/lib/visualconstructor/views/jscomponent/activity.php
  • Класс: BitrixReportVisualConstructorViewsJsComponentActivity
  • Вызов: Activity::handlerFinallyBeforePassToView
public function handlerFinallyBeforePassToView($dataFromReport)
{
	if ($dataFromReport['items'])
	{
		$items = array();
		foreach ($dataFromReport['items'] as $item)
		{

			if (!empty($items[$item['firstGroupId']][$item['secondGroupId']]))
			{
				$items[$item['firstGroupId']][$item['secondGroupId']]['active'] += (int)$item['value'];
			}
			else
			{
				$items[$item['firstGroupId']][$item['secondGroupId']] = array(
					'labelXid' => (int)$item['firstGroupId'] + 1,
					'labelYid' => (int)$item['secondGroupId'],
					'active' => (int)$item['value'],
				);
			}

		}

		foreach ($items as $firstGroupId => $secondGroup)
		{
			foreach ($secondGroup as $secondGroupId => $newItem)
			{
				$result['items'][] = $newItem;
			}
		}
	}


	$result['config']['labelY'] = $this->getWeekDaysMap();
	$result['config']['labelX'] = $this->getHourList();
	return $result;
}