diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index 91d3d729c2f..38effddb586 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -219,6 +219,13 @@ abstract class Stats return $data; } + /** + * @param int $year year number + * @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month + * @return int value + */ + protected abstract function getAverageByMonth($year, $format = 0); + /** * Return average of entity by month for several years * @@ -236,7 +243,7 @@ abstract class Stats $year = $startyear; while ($year <= $endyear) { - $datay[$year] = $this->_getAverageByMonth($year); + $datay[$year] = $this->getAverageByMonth($year); $year++; }