Hello everyone!
First of all I’d like to say that I have absolutely no experience with php. I have a silly question; here’s a line of code:
[php]
$graph = new Graph($_SESSION[‘single_view_x_size’], $_SESSION[‘single_view_y_size’], “auto”, 60);
[/php]
now I’m trying to align this graph into the centre of the page. I thought I would have to add something here but I’m not sure what.
Here’s another bunch of code that I tried messing around with (which did not help but still):
[php]
$graph->title->SetFont(FF_FONT1,FS_BOLD);
$graph->SetFrame(true,$_SESSION[‘bgcolour’], 1);
$graph->SetBackgroundGradient(‘darkblue’,‘blue’, GRAD_MIDHOR, BGRAD_PLOT);
$graph->SetColor(“darkblue”);
$graph->SetMarginColor($_SESSION[‘bgcolour’]);
$graph->img->SetMargin(100, 5, 30, 80);
$graph ->xgrid->Show(false);
$graph ->ygrid->Show(false);
$graph->xaxis->SetTitleMargin(50);
$graph->yaxis->SetTitleMargin(70);
$graph->SetYDeltaDist(60);
$graph->Stroke($plot_name);
[/php]
This is to give some more context I guess? :-\
Basically I’ve been given the source file to a web page which has some minor glitches (like centering the graph, getting some links to work etc…), so that’s what I’m trying to do, starting with centering the graph. I read a bunch of stuff on jpgraph but I couldn’t figure it out. Apologies for being so vague, I’m just hoping someone will recognize that bit of code.
CHEERS!