问题
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