graph.width = 940; graph.height = 400; //graph.maxValue = 30; graph.margin = 2; graph.colors = [ "#49a0d8"]; graph.rotateAxisText = true; <?php //require_once("tools/BarGraphData.Class.php"); //$bargraph = new BarGraphData(); require_once "./tools/EventManager.class.php"; $eventtypeid = $_GET['eventtypeid']; $eventManager = new EventManager(); // get the counts for the day $counts = $eventManager->GetAllTimeHourlyCountsByEventId($eventtypeid); // set the maximum for the graph echo "graph.maxValue = " . max($counts) . ";\n"; // set the x axis labels $hour = 0; echo "graph.xAxisLabelArr = ["; for ($i = 0; $i < count($counts) - 1; $i++) { if ($hour < 10) { echo '" ' . $hour . ':00",'; } else { echo '"' . $hour . ':00",'; } $hour++; } echo '"' . $hour . ':00"'; echo "];\n";