php要求:php7.x 版本
进入点击download 进行下载:http://jpgraph.net/download/
帮助手册:http://work.eisc.cn/jpgraph/docs/chunkhtml/index.html
测试:http://work.eisc.cn/cs/txt1.php
条形图帮助文档:http://work.eisc.cn/jpgraph/docs/chunkhtml/ch15s02.html
总览:http://work.eisc.cn/jpgraph/docs/chunkhtml/index.html
<?php
header("Content-Type:text/html;charset=utf-8");
require_once ('/www/wwwroot/work/jpgraph/src/jpgraph.php');
require_once ('/www/wwwroot/work/jpgraph/src/jpgraph_bar.php');
$datay=array(1000,2000,1900,1800,2200,1300,2001);
// Size of graph
$width=900;
$height=700;
// Set the basic parameters of the graph
$graph = new Graph($width,$height);
$graph->SetScale('textlin');
$top = 60;
$bottom = 30;
$left = 80;
$right = 30;
$graph->Set90AndMargin($left,$right,$top,$bottom);
// Nice shadow
$graph->SetShadow();
// Setup labels
$lbl = array("韩国ip\n1.1.1.1","美国ip2.2.2.2\nAnderssen","德国ip\n11.22.33.44","Nick\nDavidsson",
"David\nLindquist","Jason\nTait","Lorin\nPersson");
$graph->xaxis->SetTickLabels($lbl);
// Label align for X-axis
$graph->xaxis->SetLabelAlign('right','center','right');
// Label align for Y-axis
$graph->yaxis->SetLabelAlign('center','bottom');
// Titles
$graph->title->Set('小绿叶技术博客攻击扫段攻击防御系统拦截统计');
// Create a bar pot
$bplot = new BarPlot($datay);
$bplot->SetFillColor('orange');
$bplot->SetWidth(0.5);
$bplot->SetYMin(1990);
$graph->Add($bplot);
$graph->Stroke();
?>
Powered by ddoss.cn 12.0
©2015 - 2025 ddoss
渝公网安备50011302222260号
渝ICP备2024035333号
【实验平台安全承诺书】
小绿叶技术社区,优化网络中,点击查看配置信息
主机监控系统: 安全防火墙已开启检查cc攻击-下载文件完成后等待10s 恢复访问,检查连接数低于峰值恢复访问
您的IP:18.97.9.170,2025-06-16 07:28:17,Processed in 0.01239 second(s).