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

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

	$callTypeTitle = $this->getCallTypeTitleById($reportData[0]['callType']);

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

		$column = [
			'groupingField' => $point['value']['CURRENT_DATE'] . '
' . $point['value']['PREVIOUS_DATE'], ]; $column['value_1'] = $point['value']['CURRENT_VALUE']; $column['targetUrl_1'] = $point['url']['CURRENT_VALUE']; $column['balloon']['count']['value_1'] = $point['value']['CURRENT_VALUE']; $column['balloon']['compare'] = $point['value']['DYNAMICS']; $column['value_2'] = $point['value']['PREVIOUS_VALUE']; $column['targetUrl_2'] = $point['url']['PREVIOUS_VALUE']; $column['balloon']['count']['value_2'] = $point['value']['PREVIOUS_VALUE']; $column['balloon']['callType'] = $callTypeTitle; $result['dataProvider'][$i] = $column; } $result['graphs'] = [ $this->getGraph(1, Loc::getMessage('TELEPHONY_REPORT_GRAPH_PERIOD_COMPARE_CURRENT'), '#64b1e2', 'PeriodCompare'), $this->getGraph(2, Loc::getMessage('TELEPHONY_REPORT_GRAPH_PERIOD_COMPARE_PREVIOUS'), '#fda505', 'PeriodCompare'), ]; $result['categoryAxis']['labelFrequency'] = ceil(count($result['dataProvider']) / 10); return $result; }