public function reportPidStatus() { $dados = $this->reportPidStatusGeral(); $graph = \Lava::BarChart('PidStatus')->setOptions(['datatable' => $dados]); return $graph; }
/** * @return mixed */ public function reportIniciativaTipo(Request $request = null) { if ($request != null) { switch ($request['type']) { case 'geral': return $this->reportInicativaTipoGeral()->toJson(); break; case 'regiao': switch ($request['regiao']) { case 1: return $this->reportIniciativaTipoByUf([50, 51, 52, 53])->toJson(); break; case 2: return $this->reportIniciativaTipoByUf([11, 12, 13, 14, 15, 16, 17])->toJson(); break; case 3: return $this->reportIniciativaTipoByUf([21, 22, 23, 24, 25, 26, 27, 28, 29])->toJson(); break; case 4: return $this->reportIniciativaTipoByUf([41, 42, 43])->toJson(); break; case 5: return $this->reportIniciativaTipoByUf([31, 32, 33, 35])->toJson(); break; } break; case 'estado': if ($request['cidade'] != '') { return $this->reportIniciativaTipoByCidade($request['cidade'])->toJson(); } else { return $this->reportIniciativaTipoByUf([$request['uf']])->toJson(); } break; } } else { $dados = $this->reportInicativaTipoGeral(); $graph = \Lava::BarChart('IniciativaTipos')->setOptions(['datatable' => $dados]); return $graph; } }
/** * @param string $name * @param string $title */ public function getBarChart($name = '', $title = '') { $this->barChart = \Lava::BarChart($name, $this->lavaDataTable); $this->setTitle($title); }