PHP画图组件
PHP画图组件-SVGGraph
1、拷贝SVGGraph目录到网站根目录
2、HTM引用,如下引用两个图形文件
<html><head><title>Welcome to nginx!</title></head><body bgcolor="white" text="black"><center><h1>Welcome to nginx!</h1></center><embed src="graph.php" type="image/svg+xml" width="600" height="400" pluginspage="http://www.adobe.com/svg/viewer/install/" /> <embed src="graph2.php" type="image/svg+xml" width="600" height="400" pluginspage="http://www.adobe.com/svg/viewer/install/" /></body></html>
3、PHP文件中先引用SVGGraph.php,注意目录名区分大小写,如下为画一个线形图:
<?php
require_once './SVGGraph/SVGGraph.php';
$graph = new SVGGraph(500, 400,array (
'grid_division_h' => 1,
'grid_division_v' => 1
));
$graph->Values(1, 4, 8, 9, 16, 25, 27);
$graph->Render('LineGraph');
?>
4、帮助文档在http://www.goat1000.com/
发表评论