From 4079b454ea02a5ec6ff8f769a4e0e75ca80b4b64 Mon Sep 17 00:00:00 2001 From: Myrna Degano Date: Tue, 13 Jan 2004 18:02:59 +0000 Subject: [PATCH] =?utf8?q?Se=20agregan=20par=C3=A1metros=20para=20poder=20?= =?utf8?q?diferenciar=20secuencias=20en=20los=20gr=C3=A1ficos=20de=20punto?= =?utf8?q?s.=20Se=20completan=20comentarios=20para=20la=20documentaci?= =?utf8?q?=C3=B3n.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/MECON/Graph.php | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/lib/MECON/Graph.php b/lib/MECON/Graph.php index 088a425..c4e52d6 100644 --- a/lib/MECON/Graph.php +++ b/lib/MECON/Graph.php @@ -81,7 +81,7 @@ class MECON_Graph { * @access public */ function MECON_graph($tipo, $ancho=300, $alto=200,$titulo,$attrib_gral=NULL) - { + { $this->_tipo=$tipo; $this->_ancho= $ancho; $this->_alto= $alto; @@ -93,10 +93,10 @@ class MECON_Graph { { $this->_grafico= new Graph($ancho,$alto,"auto"); $this->_grafico->SetScale("textlin"); - + if (isset($attrib_gral['Xtitulo'])) - $this->_grafico->xaxis->title->Set($attrib_gral['Xtitulo']); - + $this->_grafico->xaxis->title->Set($attrib_gral['Xtitulo']); + if (isset($attrib_gral['Ytitulo'])) $this->_grafico->yaxis->title->Set($attrib_gral['Ytitulo']); @@ -123,6 +123,7 @@ class MECON_Graph { { $this->_grafico->SetShadow(); } + } @@ -133,6 +134,18 @@ class MECON_Graph { * @param array $secuencia Datos del arreglo * @param array $atributos Atributos especiales para la secuencia * + * Tipos de secuencias para gráficos xy: + * - lineas + * - barras + * - puntos + * + * Atributos: + * - color + * - colorRelleno + * - leyenda + * - impulso ("si") (solamente para puntos) + * - tipoMarca (de 1 a 17) (solamente para puntos) + * * @return void * @access public */ @@ -166,6 +179,11 @@ class MECON_Graph { if ($this->_verValores) $plot->value->Show(); + if (isset($atributos['colorRelleno'])) + { + $plot->SetFillColor($atributos['colorRelleno']); + } + } if ($tipo=="puntos") @@ -175,6 +193,14 @@ class MECON_Graph { $plot= new ScatterPlot($secuencia); 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['impulso'])) { @@ -192,7 +218,7 @@ class MECON_Graph { { $plot->SetLegend($atributos['leyenda']); //$this->_grafico->legend->SetLayout(LEGEND_HOR); - //$this->_grafico->legend->Pos(0.05,0.5,"bottom","center"); + $this->_grafico->legend->Pos(0.02,0.01); } -- 2.43.0