jpgraph x轴的坐标个数
<?
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轴坐标的个数
请高手指点
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轴坐标的个数
请高手指点
...全文


基础编程
