博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
pChart图表插件使用
阅读量:6615 次
发布时间:2019-06-24

本文共 1680 字,大约阅读时间需要 5 分钟。

addPoints(array(150,220,300,-250,-420,-200,300,200,100),"Server A"); $MyData->addPoints(array(140,0,340,-300,-320,-300,200,100,50),"Server B"); $MyData->setAxisName(0,"Hits"); $MyData->addPoints(array("January","February","March","April","May","Juin","July","August","September"),"Months"); $MyData->setSerieDescription("Months","Month"); $MyData->setAbscissa("Months"); #创建图形对象 $myPicture = new pImage(700,230,$MyData); #关闭平滑模式 $myPicture->Antialias = FALSE; #增加边框 $myPicture->drawGradientArea(0,0,700,230,DIRECTION_VERTICAL,array("StartR"=>240,"StartG"=>240,"StartB"=>240,"EndR"=>180,"EndG"=>180,"EndB"=>180,"Alpha"=>100)); $myPicture->drawGradientArea(0,0,700,230,DIRECTION_HORIZONTAL,array("StartR"=>240,"StartG"=>240,"StartB"=>240,"EndR"=>180,"EndG"=>180,"EndB"=>180,"Alpha"=>20)); $myPicture->drawRectangle(0,0,699,229,array("R"=>0,"G"=>0,"B"=>0)); #设置默认字体 $myPicture->setFontProperties(array("FontName"=>"../fonts/pf_arma_five.ttf","FontSize"=>6)); #定义图像区域 $myPicture->setGraphArea(60,40,650,200); #设置比例 $scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE); $myPicture->drawScale($scaleSettings); #设置图例 $myPicture->drawLegend(580,12,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL)); #设置阴影 $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10)); #画图表 $myPicture->setShadow(TRUE,array("X"=>1,"Y"=>1,"R"=>0,"G"=>0,"B"=>0,"Alpha"=>10)); $settings = array("Surrounding"=>-30,"InnerSurrounding"=>30); $myPicture->drawBarChart($settings); #递交图片 $myPicture->autoOutput("pictures/example.drawBarChart.simple.png"); ?>

 

转载于:https://www.cnblogs.com/boystar/p/4692206.html

你可能感兴趣的文章
Linux下常用的磁盘管理技术LVM
查看>>
Silverlight杂记之HTTP通信WebClient介绍
查看>>
动态路由协议之RIP配置详解
查看>>
nginx1.9+做TCP代理(端口转发)
查看>>
HTML元素的默认CSS设置介绍
查看>>
CSS-图片不变形设置
查看>>
Git异常:fatal: could not create work tree dir 'XXX': No such file or directory
查看>>
GNU make manual 翻译(八十二)
查看>>
python批量下载图片的三种方法
查看>>
/bin/bash^M: bad interpreter: 没有那个文件或目录
查看>>
apiCloud手动检测更新
查看>>
android中文api (59) —— TabHost.TabSpec
查看>>
动态生成WizardPage
查看>>
iOS - OC NSData 数据
查看>>
Java web 开发填坑记 1 -如何正确的下载 eclipse
查看>>
每日学习与工作计划移至日事清APP
查看>>
iOS - Quartz 2D 第三方框架 Charts 绘制图表
查看>>
MM顾问的常见面试问题(ZZ)
查看>>
转:Windows 8上强制Visual Studio以管理员身份运行
查看>>
迟来的加勒比海盗3 观后
查看>>