• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/lib/integration/report/view/lostcalls/lostcallsgraph.php
  • Класс: BitrixVoximplantIntegrationReportViewLostCallsLostCallsGraph
  • Вызов: LostCallsGraph::handlerFinallyBeforePassToView
public function handlerFinallyBeforePassToView($reportData)
{
	$result = $this->getConfig();

	$pointCount = count($reportData);
	if ($pointCount === 0)
	{
		return $result;
	}

	for ($i = 0; $i < $pointCount; $i++)
	{
		$point = $reportData[$i];

		$column = [
			'groupingField' => $point['value']['DATE_FORMATTED'],
		];

		$column['value_1'] = $point['value']['LOST_CALLS_COUNT'];
		$column['targetUrl_1'] = $point['url']['LOST_CALLS_COUNT'];
		$column['balloon']['count']['value_1'] = $point['value']['LOST_CALLS_COUNT'];
		$column['balloon']['compare']['value_1'] = $point['value']['DYNAMICS'];

		$result['dataProvider'][$i] = $column;
	}

	$result['graphs'][] = $this->getGraph(1, '', '#f54819', 'LostCalls');

	$result['categoryAxis']['labelFrequency'] = ceil(count($result['dataProvider']) / 10);
	$result['legend'] = null;

	return $result;
}