Ejemplo n.º 1
0
 public function graph($area)
 {
     $lines = array(array(), array());
     switch ($area) {
         case 'responses':
             // Selected range..
             $from = $this->datetime->mswDatePickerFormat($this->range[0]);
             $to = $this->datetime->mswDatePickerFormat($this->range[1]);
             $lines[0] = graphs::responses($from, $to);
             // Selected range - 1 Year earlier..
             $from = date('Y-m-d', strtotime('-1 year', strtotime($from)));
             $to = date('Y-m-d', strtotime('-1 year', strtotime($to)));
             $lines[1] = graphs::responses($from, $to);
             break;
     }
     return array($lines[0], $lines[1]);
 }