Home >php教程 >php手册 >加薪利器,老板再也不用担心生成图表图片了

加薪利器,老板再也不用担心生成图表图片了

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 19:32:261080browse

你还在纠结图表库加载的很慢吗?你还在纠结老板要扣你工资吗?加薪利器! 引入地址:http://www.codepearl.com/files/178.html-----赶快下载吧! PHP 源码与演示: 源码出处演示出处 ?php//from:http://www.codepearl.cominclude "../libchart/classes/libchar

你还在纠结图表库加载的很慢吗?你还在纠结老板要扣你工资吗? 加薪利器!

引入地址:http://www.codepearl.com/files/178.html  源码与演示:源码出处 演示出处 加薪利器,老板再也不用担心生成图表图片了 加薪利器,老板再也不用担心生成图表图片了 加薪利器,老板再也不用担心生成图表图片了 加薪利器,老板再也不用担心生成图表图片了
<?php
//from:http://www.codepearl.com
include "../libchart/classes/libchart.php";
 
    header("Content-type: image/png");
 
    $chart = new PieChart(500, 300);
 
    $dataSet = new XYDataSet();
    $dataSet->addPoint(new Point("Bleu d'Auvergne", 50));
    $dataSet->addPoint(new Point("Tomme de Savoie", 75));
    $dataSet->addPoint(new Point("Crottin de Chavignol", 30));
    $chart->setDataSet($dataSet);
 
    $chart->setTitle("Preferred Cheese");
    $chart->render();
?>
<?php
  
    //from:http://www.codepearl.com
    include "../libchart/classes/libchart.php";
 
    $chart = new VerticalBarChart();
 
    $serie1 = new XYDataSet();
    $serie1->addPoint(new Point("YT", 64));
    $serie1->addPoint(new Point("NT", 63));
    $serie1->addPoint(new Point("BC", 58));
    $serie1->addPoint(new Point("AB", 58));
    $serie1->addPoint(new Point("SK", 46));
     
    $serie2 = new XYDataSet();
    $serie2->addPoint(new Point("YT", 61));
    $serie2->addPoint(new Point("NT", 60));
    $serie2->addPoint(new Point("BC", 56));
    $serie2->addPoint(new Point("AB", 57));
    $serie2->addPoint(new Point("SK", 52));
     
    $dataSet = new XYSeriesDataSet();
    $dataSet->addSerie("1990", $serie1);
    $dataSet->addSerie("1995", $serie2);
    $chart->setDataSet($dataSet);
    $chart->getPlot()->setGraphCaptionRatio(0.65);
 
    $chart->setTitle("Average family income (k$)");
    $chart->render("generated/demo7.png");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Libchart line demonstration</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
</head>
<body>
    <img alt="Line chart" src="generated/demo7.png"   style="max-width:90%"/>
</body>
</html>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:输出最近三个月的日历Next article:web下载网站代码