]> git.llucax.com Git - mecon/meconlib.git/commitdiff
Se emprolijo el codigo
authorManuel Nazar Anchorena <manazar@mecon.gov.ar>
Mon, 26 Jan 2004 15:22:10 +0000 (15:22 +0000)
committerManuel Nazar Anchorena <manazar@mecon.gov.ar>
Mon, 26 Jan 2004 15:22:10 +0000 (15:22 +0000)
lib/MECON/Graph.php
test/Marco/prueba/www/images/perfiles.gif

index e1817fa1f9e04b6eaefa94b3c43f75550ea00632..f1957fac7931b0fb9f03382f8db151580add793d 100644 (file)
@@ -165,17 +165,6 @@ class MECON_Graph {
                 require_once 'MECON/Graph/external/jpgraph/src/jpgraph_line.php';
                 $plot= new LinePlot($secuencia);
 
                 require_once 'MECON/Graph/external/jpgraph/src/jpgraph_line.php';
                 $plot= new LinePlot($secuencia);
 
-               if (isset($atributos['formatoValores']))
-                   $plot->value->format = $atributos['formatoValores'];
-
-                if ($this->_verValores)
-                    $plot->value->Show();
-
-                if (isset($atributos['colorRelleno']))
-                {
-                    $plot->SetFillColor($atributos['colorRelleno']);
-                }
             }
         
         
             }
         
         
@@ -185,17 +174,6 @@ class MECON_Graph {
                 require_once 'MECON/Graph/external/jpgraph/src/jpgraph_bar.php';
                 $plot= new BarPlot($secuencia);
 
                 require_once 'MECON/Graph/external/jpgraph/src/jpgraph_bar.php';
                 $plot= new BarPlot($secuencia);
 
-               if (isset($atributos['formatoValores']))
-                   $plot->value->format = $atributos['formatoValores'];
-
-                if ($this->_verValores)
-                    $plot->value->Show();
-
-                if (isset($atributos['colorRelleno']))
-                {
-                    $plot->SetFillColor($atributos['colorRelleno']);
-                }
-
             }
         
             if ($tipo=="puntos")
             }
         
             if ($tipo=="puntos")
@@ -204,19 +182,8 @@ class MECON_Graph {
                 require_once 'MECON/Graph/external/jpgraph/src/jpgraph_scatter.php';
                 $plot= new ScatterPlot($secuencia);
 
                 require_once 'MECON/Graph/external/jpgraph/src/jpgraph_scatter.php';
                 $plot= new ScatterPlot($secuencia);
 
-               if (isset($atributos['formatoValores']))
-                   $plot->value->format = $atributos['formatoValores'];
-
-                if ($this->_verValores)
-                    $plot->value->Show();
-
-                if (isset($atributos['colorRelleno'])){
-                   $plot->mark->SetFillColor($atributos['colorRelleno']);
-               }    
-            
-                if (isset($atributos['tipoMarca'])){
-                   $plot->mark->SetType($atributos['tipoMarca']);
-               }    
+                if (isset($atributos['tipoMarca']))
+                           $plot->mark->SetType($atributos['tipoMarca']);
             
                 if (isset($atributos['impulso']))
                 {
             
                 if (isset($atributos['impulso']))
                 {
@@ -224,22 +191,31 @@ class MECON_Graph {
                         $plot->SetImpuls();
                 }
             }
                         $plot->SetImpuls();
                 }
             }
-        
-            // Seteo opciones generales
-            if (isset($atributos['color']))
-            {
-                $plot->SetColor($atributos['color']);
-            }
-            if (isset($atributos['leyenda']))
+            
+            //Si hubo error
+            if ($valido==true)
             {
             {
-                $plot->SetLegend($atributos['leyenda']);
-                //$this->_grafico->legend->SetLayout(LEGEND_HOR);
-                $this->_grafico->legend->Pos(0.02,0.01);
-            }
+        
+                // Seteo opciones generales
+               if (isset($atributos['formatoValores']))
+                       $plot->value->format = $atributos['formatoValores'];
 
 
+                if ($this->_verValores)
+                    $plot->value->Show();
+    
+                if (isset($atributos['colorRelleno']))
+                    $plot->SetFillColor($atributos['colorRelleno']);
+    
+                if (isset($atributos['color']))
+                    $plot->SetColor($atributos['color']);
+                if (isset($atributos['leyenda']))
+                {
+                    $plot->SetLegend($atributos['leyenda']);
+                    //$this->_grafico->legend->SetLayout(LEGEND_HOR);
+                    $this->_grafico->legend->Pos(0.02,0.01);
+                }
 
 
-            //Si hubo error
-            if ($valido==false)
+            }else
             { 
                 die ("Error: Tipo de grafico $tipo no valido (aun)");
             }
             { 
                 die ("Error: Tipo de grafico $tipo no valido (aun)");
             }
@@ -254,8 +230,8 @@ class MECON_Graph {
             if($this->_tipo=="torta3D")
                 $plot= new PiePlot3D($secuencia);
 
             if($this->_tipo=="torta3D")
                 $plot= new PiePlot3D($secuencia);
 
-           // Esto lo agrego porque si no, no redondea a 100%
-           $plot->labeltype = 2;
+               // Esto lo agrego porque si no, no redondea a 100%
+               $plot->labeltype = 2;
 
             if ($this->_verValores)
                 $plot->value->Show();
 
             if ($this->_verValores)
                 $plot->value->Show();
@@ -278,18 +254,20 @@ class MECON_Graph {
                 $plot->SetCenter($x,$y);
             }
 
                 $plot->SetCenter($x,$y);
             }
 
-           if (isset($atributos['explotar'])){
-               $plot->ExplodeAll($atributos['explotar']);
-           }
+           if (isset($atributos['explotar']))
+            {
+                       $plot->ExplodeAll($atributos['explotar']);
+           }
                
                
-        }
+        }// del if torta
 
         $this->_grafico->Add($plot);
 
 
         $this->_grafico->Add($plot);
 
-       if (isset($atributos['posLeyenda'])){
-           $this->_grafico->legend->xpos = $atributos['posLeyenda'][0];
-           $this->_grafico->legend->ypos = $atributos['posLeyenda'][1];
-       }
+       if (isset($atributos['posLeyenda']))
+        {
+               $this->_grafico->legend->xpos = $atributos['posLeyenda'][0];
+               $this->_grafico->legend->ypos = $atributos['posLeyenda'][1];
+           }
     }
    
     /**
     }
    
     /**
index 8f94ed0976f9907a13d7e89dab4aa6d80c143ae5..42adfc44ec976067787fe58bfa1d04688fee3e10 100644 (file)
Binary files a/test/Marco/prueba/www/images/perfiles.gif and b/test/Marco/prueba/www/images/perfiles.gif differ