Ver Mensaje Individual
  #9 (permalink)  
Antiguo 30/05/2007, 10:45
KARANDREZ
 
Fecha de Ingreso: enero-2007
Mensajes: 4
Antigüedad: 17 años, 4 meses
Puntos: 0
Re: Problemas con jpgraph??

Buen Dia soy nuevo en el foro...

Tengo un problema... tengo un error al pintar con jpgraph cuando hay mas de 24 datos en el eje X xaxis... no se si es un limite predefinido en las librerias de jpgraph...

En Yaxis tengo problemas cuando hay mas de 3000 datos.. no si si es problema de memoria... alguna caracteristica de PHP, apache o se deba modificar alguna funcion de jpgraph...

La funcion que utilizo es la siguiente:

if($tipo_grafico=="BARRAS_1")
{
//################################################## ###############3
// CREA EL OBJETO GRAFICO
$graph = new Graph($ancho,$alto);
$graph->SetScale("textlin");
$graph->SetBackgroundGradient('#FFFFFF','#CDDEFF:0.8',GRA D_HOR,BGRAD_PLOT);
$graph->SetBackgroundImage("../img/logobg.jpg",BGIMG_CENTER);
$graph->SetFrame(false);
$graph->title->Set($TITULO);
$graph->title->SetFont(FF_ARIAL,FS_BOLD,$tam_letra+2);
$graph->title->SetMargin(10);
//iz der arri abajo
$graph->SetMargin($mg_izq,$mg_der,$mg_arr,$mg_abajo);
$graph->AdjBackgroundImage(0.7,0.3);

// CREA EL OBJETO DE LAS BARRAS GRAFICAS
$bar1 = new BarPlot($datos_eje_Y);
// CONFIGURACION DATOS X
$graph->xgrid->SetColor('[email protected]');
$graph->xaxis->SetTickLabels($datos_eje_X);
/*$graph->xaxis->title->Set($LEYENDA_X);
$graph->xaxis->HideZeroLabel();*/
$txt1 = new Text($PARAMETROS);
$txt1->SetPos(50,50);
$txt1->SetFont(FF_ARIAL,FS_NORMAL,9);
$txt1->SetAngle(0);
$graph->Add($txt1);

$txt = new Text($LEYENDA_X);
$txt->SetPos($ancho/2,$alto-5,'center','bottom');
$txt->SetFont(FF_ARIAL,FS_BOLD,$tam_letra);
$txt->SetAngle(0);
$graph->Add($txt);

if($giro){$graph->xaxis->SetLabelAngle($giro);}
$graph->SetMarginColor('white');
$graph->xgrid->Show();

// CONFIGURACION DATOS Y
$graph->yaxis->title->Set($LEYENDA_Y);
$graph->yaxis->title->SetMargin(10);
$graph->yaxis->title->SetFont(FF_ARIAL,FS_BOLD,$tam_letra);
$graph->yaxis->scale->SetGrace(2);
$graph->yaxis->HideZeroLabel();


$graph->ygrid->SetFill(true,'#[email protected]','#[email protected]');
$graph->ygrid->SetColor('[email protected]');
$graph->ygrid->Show();

// CONFIGURACION DE LAS BARRAS
$bar1->SetLegend($ellabel);
$bar1->SetColor("#4D4DFF");
$bar1->value->SetFormat('%d');
$bar1->value->Show();
$bar1->SetShadow();
$bar1->SetFillColor('orange');

//CONFIGURA LA SALIDA GENERADA POR EL DIBUJO
$graph->Add($bar1);
if($num_grafica){$num_grafica .=$usuario_id;$graph->Stroke("/tmp/GRAFICA$num_grafica.png");}$graph->Stroke();
}

PD: Manejo la creacion de graficos pero no comprendo porque sale error o simplemente no dibuja nada cuando en el eje X envio mas de 24 datos...

agradezco la ayuda... si necesitan algo se pueden comunicar a karlosandrez arrboa gmail punto com...