05/07/2013, 16:32
|
| | | Fecha de Ingreso: mayo-2013
Mensajes: 31
Antigüedad: 11 años Puntos: 2 | |
Respuesta: JpGraph gráfica de Linea Este es mi codigo : muchas gracias! Código PHP: <?php require_once ('jpgraph/src/jpgraph.php'); require_once ('jpgraph/src/jpgraph_line.php'); require_once ('jpgraph/src/jpgraph_scatter.php'); onhand=array(100,200,300,400,500,600); dias1=array(1,2,3,4,5,46); ///// Creamos el grafico $grafico = new Graph(900, 800, 'auto'); $grafico->SetScale("textlin"); $grafico->title->Set('ITEM:'); //$grafico->subtitle->Set($item); //$grafico->img->SetAntiAliasing(); //$grafico->xgrid->Show(); //$grafico->SetBackgroundGradient('#FDFDFD','#FDFDFD'); $barplot1 =new LinePlot($onhand); $barplot1->mark->SetType(MARK_FILLEDCIRCLE); $barplot1->mark->SetFillColor("red"); $barplot1->mark->SetWidth(2); $barplot1->SetColor("blue"); $barplot1->SetWeight(2); $barplot1->SetCenter(); $barplot1->value->SetFormat('%d'); $barplot1->value->Show(); $barplot1->value->SetColor('#55bbdd'); $grafico->img->SetMargin(70,50,50,70); $grafico->xaxis->title->Set("Dias"); $grafico->xaxis->SetTickLabels($dias1); $grafico->yaxis->title->Set("On-Hand"); $grafico->ygrid->SetFill(true,'#[email protected]','#[email protected]'); $grafico->Add($barplot1); $grafico->Stroke(); ?> |