jpgraph图表实例
?php br / include(jpgraph/jpgraph.php); br / include(jpgraph/jpgraph_line.php); br / $datay = array(112,332,130,57,82,69,170,1215,150,71,49,100,39,126,135,326,127,221,129,145,154,223,135,233); //填充的数据 br / $graph = new Graph(400,20
<?php
include("jpgraph/jpgraph.php");
include("jpgraph/jpgraph_line.php");
$datay = array(112,332,130,57,82,69,170,1215,150,71,49,100,39,126,135,326,127,221,129,145,154,223,135,233); //填充的数据
$graph = new Graph(400,200);
//$graph->img->SetMargin(35,35,55,25);
$graph->img->SetAntiAliasing();
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->SetMarginColor("lightblue");
$graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->xaxis->SetPos(0.5,0.6);
$graph->yaxis->HideZeroLabel();
$graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5');
//$graph->xaxis->SetTickLabels($a);
$graph->xaxis->SetFont(FF_SIMSUN);
$graph->yscale->SetGrace(20);
$p1 = new LinePlot($datay);
$p1->mark->SetType(0);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$p1->SetColor("blue");
$p1->SetCenter();
$graph->Add($p1);
$graph->Stroke();
include("jpgraph/jpgraph.php");
include("jpgraph/jpgraph_line.php");
$datay = array(112,332,130,57,82,69,170,1215,150,71,49,100,39,126,135,326,127,221,129,145,154,223,135,233); //填充的数据
$graph = new Graph(400,200);
//$graph->img->SetMargin(35,35,55,25);
$graph->img->SetAntiAliasing();
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->SetMarginColor("lightblue");
$graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->title->SetFont(FF_SIMSUN,FS_BOLD);
$graph->xaxis->SetPos(0.5,0.6);
$graph->yaxis->HideZeroLabel();
$graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5');
//$graph->xaxis->SetTickLabels($a);
$graph->xaxis->SetFont(FF_SIMSUN);
$graph->yscale->SetGrace(20);
$p1 = new LinePlot($datay);
$p1->mark->SetType(0);
$p1->mark->SetFillColor("red");
$p1->mark->SetWidth(4);
$p1->SetColor("blue");
$p1->SetCenter();
$graph->Add($p1);
$graph->Stroke();
<?php include("jpgraph/jpgraph.php"); include("jpgraph/jpgraph_line.php"); $datay = array(112,332,130,57,82,69,170,1215,150,71,49,100,39,126,135,326,127,221,129,145,154,223,135,233); //填充的数据 $graph = new Graph(400,200); //$graph->img->SetMargin(35,35,55,25); $graph->img->SetAntiAliasing(); $graph->SetScale("textlin"); $graph->SetShadow(); $graph->xaxis->title->SetFont(FF_SIMSUN,FS_BOLD); $graph->SetMarginColor("lightblue"); $graph->yaxis->title->SetFont(FF_SIMSUN,FS_BOLD); $graph->title->SetFont(FF_SIMSUN,FS_BOLD); $graph->xaxis->SetPos(0.5,0.6); $graph->yaxis->HideZeroLabel(); $graph->ygrid->SetFill(true,'#EFEFEF@0.5','#BBCCFF@0.5'); //$graph->xaxis->SetTickLabels($a); $graph->xaxis->SetFont(FF_SIMSUN); $graph->yscale->SetGrace(20); $p1 = new LinePlot($datay); $p1->mark->SetType(0); $p1->mark->SetFillColor("red"); $p1->mark->SetWidth(4); $p1->SetColor("blue"); $p1->SetCenter(); $graph->Add($p1); $graph->Stroke();
- 上一篇:命令行做无限循环后台进程
- 下一篇:查找字符串第n次出现的位置
精彩图集
精彩文章