$value) { if ($key == 0) { $str .= '"'.$value.'"'; }else{ $str .= ', "'.$value.'"'; } } self::$BarLabels = $str; } public static function BarColor($condition, $data){ if ($condition == "all") { $color = ""; $bar = self::$BarLabels; $explodebar = explode(",", $bar); for ($i=0; $i < count($explodebar) ; $i++) { if ($i == 0) { $color .= '"'.$data.'"'; }else{ $color .= ',"'.$data.'"'; } } self::$BarColor = $color; }else{ $color = ""; foreach ($variable as $key => $value) { if ($key == 0) { $color = '"'.$value.'"'; }else{ $color .= ',"'.$value.'"'; } } self::$BarColor = $color; } } public static function BarValue($value){ $nilai = ""; foreach ($value as $key => $n) { if ($key == 0) { $nilai .= '"'.$n.'"'; }else{ $nilai .= ',"'.$n.'"'; } } self::$BarValue = $nilai; } private static function BarScript(){ return " "; } private static function CreateCanvasBar() { return ""; } public static function CreateBar(){ $aa = self::CreateCanvasBar(); $bb = self::BarScript(); return $aa.$bb; } public static function sum($arr){ return array_sum($arr); } public static function average($arr){ $sum = array_sum($arr); $average = $sum / count($arr); return $average; } private static $form_set_style; public static function formStyle($aa = "") { self::$form_set_style = $aa; } public static function formStart() { return ' '; } public static function formInputText($name ,$nameClass, $placeholder="", $value=""){ return '