Ejemplo n.º 1
0
 public function ajaxStabilizersByWorkingStatusAction()
 {
     //ccem proposed list 1.13a (37)
     $this->_helper->layout->disableLayout();
     $ccm_models = new Model_CcmModels();
     $form_values['office'] = $this->_request->getParam('office', '');
     $form_values['combo1'] = $this->_request->getParam('combo1', '');
     $form_values['combo2'] = $this->_request->getParam('combo2', '');
     $ccm_models->form_values = $form_values;
     $data_arr = $ccm_models->stabilizersByWorkingStatusGraph();
     $main_heading = "Stabilizers By Working Status";
     $str_sub_heading = "";
     $number_prefix = "";
     $number_suffix = "%";
     $s_number_prefix = "";
     $xmlstore = "<?xml version=\"1.0\"?>";
     $xmlstore .= '<chart caption="' . $main_heading . '" numberprefix="' . $number_prefix . '" showvalues="0" showborder="0" exportEnabled="1" rotateValues="1" theme="fint">';
     $categories = '<categories>';
     $dataset_1 = '<dataset seriesname="Working" >';
     $dataset_2 = '<dataset seriesname="Not Working" >';
     foreach ($data_arr as $sub_arr) {
         $categories .= '<category label="' . $sub_arr['FacilityType'] . '" />';
         $dataset_1 .= '<set value="' . $sub_arr['workingQuantity'] . '" />';
         $dataset_2 .= '<set value="' . $sub_arr['notWorkingQuantity'] . '" />';
     }
     $categories .= '</categories>';
     $dataset_1 .= '</dataset>';
     $dataset_2 .= '</dataset>';
     $xmlstore .= $categories;
     $xmlstore .= $dataset_1;
     $xmlstore .= $dataset_2;
     $xmlstore .= "</chart>";
     $this->view->xmlstore = $xmlstore;
     $this->view->main_heading = $main_heading;
     $this->view->str_sub_heading = $str_sub_heading;
     $this->view->chart_type = 'StackedBar2D';
     $this->view->width = '80%';
     $this->view->height = '500';
 }