private function createTimeGraph($barChart, $threeD, $report, $userId, $bikeId, $rideId, $fromDate, $toDate) { if ($barChart) { $graph = new ezcGraphBarChart(); } else { $graph = new ezcGraphLineChart(); } if ($threeD) { $graph->renderer = new ezcGraphRenderer3d(); } $graph->title = 'Time'; $graphData = reportQueries::getRideTimeReportData($report, $userId, $bikeId, $rideId, $fromDate, $toDate); // Add data foreach ($graphData as $cat => $data) { $graph->data[$cat] = new ezcGraphArrayDataSet($data); } $graph->data['Average']->displayType = ezcGraph::LINE; $graph->options->fillLines = 210; $title = 'images/charts/TimeGraph_' . $userId . '.svg'; $graph->render(650, 350, $title); return $title; }