JpGraph margin issue

与世无争的帅哥 提交于 2019-12-12 05:20:01

问题


i just generated a graph using jpGraph library.someone please help me to fix the left margin of the image generated by the jpgraph library. as you can see , the Yscale numbers are 6 digit , and it showing only 5 because of the margin issue. Please refer the below code and the image. Thanks

// 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();


回答1:


solved

$graph->SetMargin(70,10,40,20);


来源:https://stackoverflow.com/questions/35596443/jpgraph-margin-issue

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!