From 3a1af669c482f182bda2e500e87526b5d33c8372 Mon Sep 17 00:00:00 2001 From: Myrna Degano Date: Fri, 16 Jan 2004 21:37:12 +0000 Subject: [PATCH] =?utf8?q?Se=20agrega=20el=20atributo=20formatoValores=20p?= =?utf8?q?ara=20parametrizar=20la=20forma=20en=20que=20se=20ven=20los=20va?= =?utf8?q?lores=20en=20los=20gr=C3=A1ficos=20XY=20(por=20ejemplo,=20sin=20?= =?utf8?q?decimales).?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/MECON/Graph.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/MECON/Graph.php b/lib/MECON/Graph.php index 14edce7..9f877aa 100644 --- a/lib/MECON/Graph.php +++ b/lib/MECON/Graph.php @@ -148,6 +148,7 @@ class MECON_Graph { * - explotar (para torta y torta3D) (valor que indica la separaciĆ³n de * de las porciones de la torta) * - posLeyenda (array con dos coordenadas para la posiciĆ³n de la leyenda) + * - formatoValores (string con el formato que se quiere dar a los valores (sprintf)) * * @return void * @access public @@ -163,6 +164,10 @@ class MECON_Graph { $valido=true; 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(); @@ -179,6 +184,10 @@ class MECON_Graph { $valido=true; 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(); @@ -194,9 +203,13 @@ class MECON_Graph { $valido=true; 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']); } -- 2.43.0