From 346883c2d2f54d69db2aae70b8c27fbb3ec15ca4 Mon Sep 17 00:00:00 2001 From: Myrna Degano Date: Wed, 28 Jan 2004 16:48:45 +0000 Subject: [PATCH] =?utf8?q?Uno=20de=20los=20atributos=20tomados=20como=20ge?= =?utf8?q?nerales=20no=20corresponde=20a=20todos=20los=20gr=C3=A1ficos=20p?= =?utf8?q?or=20lo=20que=20se=20generaba=20error.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/MECON/Graph.php | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/lib/MECON/Graph.php b/lib/MECON/Graph.php index f1957fa..f7e9ab3 100644 --- a/lib/MECON/Graph.php +++ b/lib/MECON/Graph.php @@ -139,7 +139,7 @@ class MECON_Graph { * * Atributos: * - color - * - colorRelleno + * - colorRelleno (solamente barras y puntos) * - leyenda * - impulso ("si") (solamente para puntos) * - tipoMarca (de 1 a 17) (solamente para puntos) @@ -165,8 +165,10 @@ class MECON_Graph { require_once 'MECON/Graph/external/jpgraph/src/jpgraph_line.php'; $plot= new LinePlot($secuencia); + if (isset($atributos['colorRelleno'])) + $plot->SetFillColor($atributos['colorRelleno']); } - + if ($tipo=="barras") { @@ -174,8 +176,11 @@ class MECON_Graph { require_once 'MECON/Graph/external/jpgraph/src/jpgraph_bar.php'; $plot= new BarPlot($secuencia); + if (isset($atributos['colorRelleno'])) + $plot->SetFillColor($atributos['colorRelleno']); } - + + if ($tipo=="puntos") { $valido=true; @@ -203,11 +208,9 @@ class MECON_Graph { 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']); @@ -237,15 +240,10 @@ class MECON_Graph { $plot->value->Show(); if (isset($atributos['leyendas'])) - { $plot->SetLegends($atributos['leyendas']); - } if (isset($atributos['etiquetas'])) - { $plot->SetLabels($atributos['etiquetas']); - } - if (isset($atributos['centro'])) { @@ -255,9 +253,7 @@ class MECON_Graph { } if (isset($atributos['explotar'])) - { $plot->ExplodeAll($atributos['explotar']); - } }// del if torta -- 2.43.0