Пример #1
0
 private function miniJobOrderPipeline()
 {
     $statistics = new Statistics($this->_siteID);
     if (!$this->isRequiredIDValid('params', $_GET)) {
         die;
     }
     $statisticsData = $statistics->getPipelineData($_GET['params']);
     /* We can expand things a bit if we have more room. */
     if ($this->width > 600) {
         $y = array("Total Pipeline", "Contacted", "Cand Replied", "Qualifying", "Submitted", "Interviewing", "Offered", "Declined", "Placed");
     } else {
         $y = array("Total Pipeline", "|Contacted", "Cand Replied", "|Qualifying", "Submitted", "|Interviewing", "Offered", "|Declined", "Placed");
     }
     $x[8] = $statisticsData['placed'];
     $x[7] = $statisticsData['passedOn'];
     $x[6] = $statisticsData['offered'] + $x[8];
     $x[5] = $statisticsData['interviewing'] + $x[6];
     $x[4] = $statisticsData['submitted'] + $x[5];
     $x[3] = $statisticsData['qualifying'] + $x[4];
     $x[2] = $statisticsData['replied'] + $x[3];
     $x[1] = $statisticsData['contacted'] + $x[2];
     $x[0] = $statisticsData['totalPipeline'];
     $colorOptions = Graphs::getColorOptions();
     $colorArray = array();
     for ($i = 0; $i < 9; $i++) {
         $colorArray[] = new LinearGradient(new DarkGreen(), new White(), 0);
     }
     $colorArray[4] = new LinearGradient(new Orange(), new White(), 0);
     $colorArray[7] = new LinearGradient(new AlmostBlack(), new White(), 0);
     $graph = new GraphComparisonChart($y, $x, $colorArray, 'Job Order Pipeline', $this->width, $this->height, $statisticsData['totalPipeline']);
     if (!eval(Hooks::get('GRAPH_MINI_PIPELINE'))) {
         return;
     }
     $graph->draw();
     die;
 }