php画图绘图插件libchart使用例子

作者:袖梨 2022-06-24

ibchart可以让我们生成简洁美观大方的图片
采用gd库,不用生成FLASH

word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-">
php画图绘图插件libchart使用例子

php画图绘图插件libchart使用例子

 

代码比较简单,以致于太多的解释都是多余的
 代码如下 复制代码
 
 
include "../libchart/classes/libchart.php";
 
$chart = new VerticalBarChart();
 
$dataSet = new XYDataSet();
$dataSet->addPoint(new Point("Jan 2005", 273));
$dataSet->addPoint(new Point("Feb 2005", 421));
$dataSet->addPoint(new Point("March 2005", 642));
$dataSet->addPoint(new Point("April 2005", 800));
$dataSet->addPoint(new Point("May 2005", 1200));
$dataSet->addPoint(new Point("June 2005", 1500));
$dataSet->addPoint(new Point("July 2005", 2600));
$chart->setDataSet($dataSet);
 
$chart->setTitle("Monthly usage for www.111com.net");
$chart->render("https://img.111cn.netgenerated/demo1.png");
?>
 
Vertical bars chart
官方网站,类包下载。
http://naku.dohcrew.com/libchart/pages/introduction/

相关文章

精彩推荐