From 3eaf7c02da09035831bcac30515ad250af60694f Mon Sep 17 00:00:00 2001 From: Myrna Degano Date: Thu, 29 Jan 2004 18:54:05 +0000 Subject: [PATCH] =?utf8?q?Se=20agrega=20la=20posibilidad=20de=20setear=20l?= =?utf8?q?os=20m=C3=A1rgenes=20del=20gr=C3=A1fico=20en=20el=20=C3=A1rea=20?= =?utf8?q?de=20dibujo.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/MECON/Graph.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/lib/MECON/Graph.php b/lib/MECON/Graph.php index 4ca6de1..0929b13 100644 --- a/lib/MECON/Graph.php +++ b/lib/MECON/Graph.php @@ -82,6 +82,11 @@ class MECON_Graph { * - YTitulo (Título del Eje Y) * - XEtiquetas (Array de Referencias del eje X) * - XEtiquetasRotar (Rota las etiquetas del eje X en 90 grados) + * - margenes (array asociativo con alguna/s de las siguientes claves: + * - L (margen izquierdo) + * - R (margen derecho) + * - T (margen superior) + * - B (margen inferior)) * * @return void * @access public @@ -130,8 +135,22 @@ class MECON_Graph { $this->_grafico->subtitle->Set($attrib_gral['subTitulo']); if (isset($attrib_gral['verSombra']) and $attrib_gral['verSombra']==true) $this->_grafico->SetShadow(); - - } + + if (isset($attrib_gral['margenes'])){ + if (isset($attrib_gral['margenes']['L'])) + $this->_grafico->img->left_margin = $attrib_gral['margenes']['L']; + + if (isset($attrib_gral['margenes']['R'])) + $this->_grafico->img->right_margin = $attrib_gral['margenes']['R']; + + if (isset($attrib_gral['margenes']['T'])) + $this->_grafico->img->top_margin = $attrib_gral['margenes']['T']; + + if (isset($attrib_gral['margenes']['B'])) + $this->_grafico->img->bottom_margin = $attrib_gral['margenes']['B']; + } + + } /** -- 2.43.0