PHP - Jpgraph bar

 
Vista:

Jpgraph bar

Publicado por Mario (4 intervenciones) el 02/03/2007 20:17:33
Buenas tardes.

Estoy tratando de generar un grafico tipo bar pero que la leyenda este contenida en un array y no me lo genera. solo lo genera cuando la legenda es fija

$graph = new Graph(250,170,'auto');
$graph->SetFrameBevel(0,false,'black');
$graph->SetScale("textlin");
$graph->img->SetMargin(30,0,10,50);
// $graph->xaxis->SetTickLabels($aLegend);
$graph->xaxis->SetFont(FF_ARIAL,FS_NORMAL,6);
// $graph->xaxis->SetLabelAngle(30);
$graph->SetMarginColor('white');

// Add a drop shadow
$graph->SetShadow();

// Adjust the margin a bit to make more room for titles
$graph->img->SetMargin(40,30,20,40);

// Create a bar pot
$bplot = new BarPlot($aData);

// Adjust fill color
$bplot->SetFillColor(array("#769F13","#DF3A00","#1578AF",'orange', 'gray', 'white', 'black','yellow','purple','gold','silver','aqua'));
$bplot->SetLegends($aLegend); ---Este es la leyenda cargada en array
$bplot->SetWidth(1.0);
$graph->Add($bplot);

// Setup the titles


$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);

// Display the graph
$graph->Stroke();
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder