Link to home
Start Free TrialLog in
Avatar of PeterErhard
PeterErhard

asked on

jpgraph problem

See the attached screen print.

Does anyone know how I can remove the dates from the top of the graph and the numbers from the right side of the graph?
$graph = new Graph(500,375,"auto");
					$graph->img->SetMargin(40,40,20,40);
					$graph->SetScale("linlin");
 
					function _cb_negate($aVal)
					{
						return round(-$aVal);
					}
 
					$n = count($datay);
					for($i=0; $i<$n; ++$i) {
						$datay[$i] = -$datay[$i];
					}
 
					$lineplot=new LinePlot($datay);
 
					$graph->yaxis->SetLabelFormatCallback("_cb_negate");
					$graph->xaxis->SetTickLabels($datax);
 
					$graph->SetMarginColor('darkblue');
					$graph->SetColor('darkblue');
					$graph->SetAxisStyle(AXSTYLE_BOXOUT);
					$graph->title->SetFont(FF_FONT1,FS_BOLD);
					$graph->title->SetColor("white");
					$graph->subtitle->SetFont(FF_FONT1,FS_NORMAL);
					$graph->subtitle->SetColor("white");
					$graph->xaxis->SetColor("lightblue","white");
					$graph->yaxis->SetColor("lightblue","white");
					$graph->ygrid->SetColor("blue");
 
					$lineplot->SetColor("yellow");
					$lineplot->SetWeight(2);
					$graph->xaxis->SetTextLabelInterval(3);
 
					$graph->Add($lineplot);
$graph->Stroke("/home/?/public_html/?/graph/" . $? .  ".jpg");

Open in new window

graph.jpg
Avatar of hernst42
hernst42
Flag of Germany image

Remove the line
$graph->SetAxisStyle(AXSTYLE_BOXOUT);
or use
$graph->SetAxisStyle(AXSTYLE_SIMPLE);

Avatar of PeterErhard
PeterErhard

ASKER

Thanks for that, if I replace it with $graph->SetAxisStyle(AXSTYLE_SIMPLE); it doesn't display the dates at the bottom. See attached.

Any ideas?
graph2.jpg
and if I remove it completely it displays the same as above as well.
Anyone aware of how this can be solved?
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial