jpgraph x轴的坐标个数

sunaxe sunaxe 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<?
require_once("../jgraph/jpgraph.php");
require_once("../jgraph/jpgraph_line.php");
require_once("../jgraph/jpgraph_date.php");
require_once("../jgraph/jpgraph_bar.php");
require_once("../jgraph/jpgraph_gb2312.php");
include("../include/function.php");

$date=$_REQUEST["date"];

$data1y=alltimebyte($date,'0');
$datax=array('北京','上海','天津','重庆','黑龙江','吉林','辽宁','青海','甘肃','陕西','西藏','四川','贵州','云南','广东','福建','湖南','江西','湖北','浙江','江苏','河南','河北','山东','山西','海南','安徽','内蒙古','新疆','宁夏','广西');
// Create the new graph
$graph2 = new Graph(950,300,'auto');

// Slightly larger than normal margins at the bottom to have room for
// the x-axis labels
$graph2->SetMargin(30,60,30,40);

// Fix the Y-scale to go between [0,100] and use date for the x-axis
$graph2->SetScale('textlin',auto,auto);
$graph2->title->Set($date);
$b2plot2 = new BarPlot($data1y);
$b2plot2->value->Show();
$b2plot2->SetFillColor("orange");
$b2plot2->SetWidth(0.1);

$graph2->xaxis->SetFont(FF_SIMSUN ,FS_NORMAL,9);

$graph2->xaxis->SetTickLabels($datax);


// Some extra margin looks nicer
$graph2->xaxis->SetLabelMargin(20);

// Label align for X-axis
$graph2->xaxis->SetLabelAlign('center','center');

// Create the grouped bar plot

// ...and add it to the graPH
$graph2->Add($b2plot2);


$graph2->Stroke();

?>
本人想做一个
分省的统计图发现只能显示前24个
好像是坐标的限制
查了手册
未发现制定x轴坐标的个数
请高手指点
...全文
评论
收藏 已收藏
分享
返回顶部
sunaxe
基础编程 21,889 成员 140,329 内容