function _yandex_metrics_reports_calculate_grid_step_fixed in Yandex.Metrics 8.2
Same name and namespace in other branches
- 7.2 yandex_metrics_reports/yandex_metrics_reports.reports.inc \_yandex_metrics_reports_calculate_grid_step_fixed()
Helper function to calculate params for grids with fixed number of grid lines.
Parameters
int $data_count: Count of data values.
2 calls to _yandex_metrics_reports_calculate_grid_step_fixed()
- yandex_metrics_reports_traffic_hourly_chart in yandex_metrics_reports/
yandex_metrics_reports.reports.inc - The function generates chart with information about hourly traffic.
- yandex_metrics_reports_visits_chart in yandex_metrics_reports/
yandex_metrics_reports.reports.inc - The function generates chart with information about page views, visitors and new visitors.
File
- yandex_metrics_reports/
yandex_metrics_reports.reports.inc, line 473 - Report callbacks for Yandex.Metrics Reports module.
Code
function _yandex_metrics_reports_calculate_grid_step_fixed($data_count) {
$grid_count = $data_count > 1 ? $data_count - 1 : $data_count;
$step_percent = 100 / $grid_count;
return $step_percent;
}