graph.colors = [ "#49a0d8"]; graph.rotateAxisText = true; <?php //require_once("./tools/BarGraphData.Class.php"); //$bargraph = new BarGraphData(); require_once "./tools/EventManager.class.php"; $eventManager = new EventManager(); $eventtypeid = $_GET['eventtypeid']; $date = $_GET["date"]; if ($date == "") { $date = date("Y-m-d"); } // get the counts for the day $counts = $eventManager->GetHourlyCountsByEventId($eventtypeid, $date); // 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";