2008/7/7 月曜日

高機能グラフ作成ソフト - JpGraph

Filed under: アプリケーション — ne-zu @ 23:09:10 このエントリをはてなブックマークに追加

高機能なグラフ作成ソフト、JpGraph

高機能グラフ作成ソフト - JpGraph | アシアル株式会社

こいつは何だかすごそうだ。

PHP:
  1. <?php
  2. include ("../jpgraph.php");
  3. include ("../jpgraph_bar.php");
  4.  
  5. $datay=array(12,8,19,3,10,5);
  6.  
  7. // Create the graph. These two calls are always required
  8. $graph = new Graph(300,200,"auto");   
  9. $graph->SetScale("textlin");
  10.  
  11. // Add a drop shadow
  12. $graph->SetShadow();
  13.  
  14. // Adjust the margin a bit to make more room for titles
  15. $graph->img->SetMargin(40,30,20,40);
  16.  
  17. // Create a bar pot
  18. $bplot = new BarPlot($datay);
  19. $graph->Add($bplot);
  20.  
  21. // Setup the titles
  22. $graph->title->Set("A simple bar graph");
  23. $graph->xaxis->title->Set("X-title");
  24. $graph->yaxis->title->Set("Y-title");
  25.  
  26. $graph->title->SetFont(FF_FONT1,FS_BOLD);
  27. $graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD);
  28. $graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD);
  29.  
  30. // Display the graph
  31. $graph->Stroke();
  32. ?>

簡単な棒グラフなら、こんな感じみたいです。よさそう!

関連する記事:

Powered by

コメント (0) »

この記事にはまだコメントがついていません。

コメント RSS トラックバック URL

コメントをどうぞ

Powered by PHP-SeeD and WordPress ME