【问题标题】:JpGraph margin issueJpGraph 保证金问题
【发布时间】: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


    【解决方案1】:

    解决了

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

    【讨论】:

      猜你喜欢
      • 2023-03-26
      • 1970-01-01
      • 2014-04-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-17
      相关资源
      最近更新 更多