添付画像をみて頂きたいのですが、七つの数値の平均値を、【平均】と書かれている場所に表示したいです。
平均値の割り出し方はこちらの方でできているので、どのメソッドを使えば、この場所にフリーエリアみたいなものを表示できるのかご教示いただきたいです。
$plot2->SetLegend("Actual");とすればActualなどが書かれた枠ができるように、どのメソッドを使えば、この箇所に指定した数値を表示できますでしょうか。
この場所が無理な場合でも画像内であればどこでも大丈夫ですので宜しくお願いいたします。
AddText メソッドを使うんじゃないでしょうか。
以下、JpGraph のドキュメントにサンプルコードが載ってます。
http://jpgraph.net/download/manuals/chunkhtml/ch14s17.html
<?php // Create an instance of the Text class and set the string at the same time $txt = new Text('This is a text'); // Position the string at absolute pixels (0,20). // ( (0,0) is the upper left corner ) $txt->SetPos(0, 20); // Set color and fonr for the text $txt->SetColor('red'); $txt->SetFont(FF_FONT2,FS_BOLD); // ... and add the text to the graph $graph->AddText($txt); ?>
すばらしい!できました!
2012/10/25 14:48:58さっそくの回答ありがとうございました★