通过使用以下命令,我可以轻松地将标题定位在中心或左侧:
$graph->setTitleLocation("center");
$graph->setTitleLocation("left");
......但如果我使用这个:
$graph->setTitleLocation("right");
我什至再也看不到图表了。完整代码:
<?php
include('../phpgraphlib.php');
$graph = new PHPGraphLib(500, 350);
$data = array(12124, 5535, 43373, 22223, 90432, 23332, 15544, 24523, 32778, 38878, 28787, 33243, 34832, 32302);
$graph->addData($data);
$graph->setTitle('Widgets Produced');
$graph->setTitleLocation("right");
$graph->setGradient('red', 'maroon');
$graph->createGraph();