X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/6afa6384d2745cdd3de0d3a00c7b3ef06c2b9f98..3a1af669c482f182bda2e500e87526b5d33c8372:/lib/MECON/Graph.php 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']); }