อย่างเช่น $graph และ $activity ไปยัง function echoSetFont แบบนี้ครับ
<?php // content="text/plain; charset=utf-8"
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_line.php');
// Some data
$ydata = array(11,3,8,12,5,1,9,13,5,7);
// Create the graph. These two calls are always required
$g = new Graph(350,250);
$g->SetScale('textlin');
// Create the linear plot
$line=new LinePlot($ydata);
$line->SetColor('blue');
// Add the plot to the graph
$g->Add($line);
//START SHOW SETFONTABLE OBJECT
echoSetFont($g,'$g','FF_JASMINE');
echoSetFont($line,'$line','FF_JASMINE');
function echoSetFont($obj,$name,$fontNumber='FF_USERFONT1'){
foreach($obj as $k=>$o){
if (is_object($o)){
$vars = array_keys(get_object_vars($o));
if (method_exists($o,'SetFont')){
echo $name,'->',$k,'->SetFont('.$fontNumber.')<br/>';
}
if ($k != 'graph_theme'){
echoSetFont($o,$name.'->'.$k,$fontNumber);
}
}
}
}
//END SHOW SETFONTABLE OBJECT
// Display the graph
$g->Stroke();
?>
ไม่มีความคิดเห็น:
แสดงความคิดเห็น