} $px3->SetLegend($legend); $px3->SetYLabel($langs->trans("AmountAverage")); $px3->SetMaxValue($px3->GetCeilMaxValue()); $px3->SetMinValue($px3->GetFloorMinValue()); $px3->SetWidth($WIDTH); $px3->SetHeight($HEIGHT); $px3->SetShading(3); $px3->SetHorizTickIncrement(1); $px3->SetPrecisionY(0); $px3->mode = 'depth'; $px3->SetTitle($langs->trans("AmountAverage")); $px3->draw($filename_avg, $fileurl_avg); } // Show array $data = $stats->getAllByYear(); $arrayyears = array(); foreach ($data as $val) { $arrayyears[$val['year']] = $val['year']; } if (!count($arrayyears)) { $arrayyears[$nowyear] = $nowyear; } $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/stats/index.php'; $head[$h][1] = $langs->trans("ByMonthYear"); $head[$h][2] = 'byyear'; $h++; complete_head_from_modules($conf, $langs, $object, $head, $h, 'trip_stats'); dol_fiche_head($head, 'byyear', $langs->trans("Statistics"));