【发布时间】:2016-06-06 09:44:27
【问题描述】:
我刚刚使用 jpGraph 库生成了一个图表。请有人帮我修复 jpgraph 库生成的图像的左边距。如您所见,Yscale 数字是 6 位数,由于边距问题,它仅显示 5。请参考下面的代码和图像。谢谢
// Setup the graph
$graph = new Graph(800,400,'auto');
$graph->SetFrame(false);
$graph->SetScale('textint');
$theme_class=new UniversalTheme;
$graph->SetTheme = null;
$graph->title->Set('Filled Y-grid');
$graph->SetBox(false);
$graph->img->SetAntiAliasing();
$graph->yaxis->HideZeroLabel(false);
$graph->yaxis->HideLine(false);
$graph->yaxis->HideTicks(false,false);
$graph->yaxis->scale->SetAutoMin(0);
$graph->xgrid->Show();
$graph->xgrid->SetLineStyle("solid");
$graph->xaxis->SetTickLabels(array('1'));
$graph->xgrid->SetColor('#E3E3E3');
// Create the first line
$p1 = new LinePlot($datay1);
$graph->Add($p1);
$p1->SetColor("#6495ED");
$p1->SetLegend('Line 1');
$graph->legend->SetFrameWeight(1);
// Output line
$graph->Stroke();
【问题讨论】:
标签: jpgraph