この関数は、JpGraphの全てのグラフに共通で使用できます。
JpGraphは、デフォルトでグラフの周囲に枠が描画されます。ホームページのデザインに
合わせるとこれが邪魔になってくる場合があります。
プロットエリアの外の枠を消すには、SetFrame();関数を使用します。
SetFrame();関数へfalseを渡すことで枠を消すことが出来ます。
<?php require_once 'jpgraph.php'; require_once 'jpgraph_bar.php'; $xdata = array('Jan','Feb','Mar','Apr','May'); $graph = new Graph(200,150,'auto'); $graph->SetFrame(true); $graph->SetScale('textlin'); $graph->xaxis->SetTickLabels($xdata); $ydata1 = array(13,9,17,8,13); $plot1 = new BarPlot($ydata1); $plot1->SetFillColor('orange'); $ydata2 = array(17,8,13,13,9); $plot2 = new BarPlot($ydata2); $plot2->SetFillColor('lightblue'); $gplot = new GroupBarPlot(array($plot1,$plot2)); $graph->Add($gplot); $graph->Stroke(); ?>
Copyright 1997-2010 BBB All rights reserved.