本文整理汇总了PHP中Amenadiel\JpGraph\Graph\Graph::AddText方法的典型用法代码示例。如果您正苦于以下问题:PHP Graph::AddText方法的具体用法?PHP Graph::AddText怎么用?PHP Graph::AddText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Amenadiel\JpGraph\Graph\Graph
的用法示例。
在下文中一共展示了Graph::AddText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$l2datay = array(23, 12, 5, 19, 17, 10, 15);
$datax = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul");
// Create the graph.
$graph = new Graph\Graph(350, 200);
$graph->img->SetMargin(40, 70, 20, 40);
$graph->SetScale("textlin");
$graph->SetShadow();
$graph->SetColor(array(250, 250, 250));
$graph->img->SetTransparent("white");
$t1 = new Text\Text("This is a text");
$t1->SetPos(0.5, 0.5);
$t1->SetOrientation("h");
$t1->SetFont(FF_FONT1, FS_BOLD);
$t1->SetBox("white", "black", "gray");
$t1->SetColor("black");
$graph->AddText($t1);
// Create the linear error plot
$l1plot = new Plot\LinePlot($l1datay);
$l1plot->SetColor("blue");
$l1plot->SetWeight(2);
$l1plot->SetLegend("Prediction");
// Create the bar plot
$l2plot = new Plot\BarPlot($l2datay);
$l2plot->SetFillColor("orange");
$l2plot->SetLegend("Result");
// Add the plots to the graph
$graph->Add($l1plot);
$graph->Add($l2plot);
$graph->title->Set("Example 16.3");
$graph->xaxis->title->Set("Month");
$graph->yaxis->title->Set("x10,000 US\$");
示例2: AddText
public function AddText($aTxt, $aToY2 = false)
{
parent::AddText($aTxt);
}