本文整理汇总了PHP中pChart::AddBorder方法的典型用法代码示例。如果您正苦于以下问题:PHP pChart::AddBorder方法的具体用法?PHP pChart::AddBorder怎么用?PHP pChart::AddBorder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pChart
的用法示例。
在下文中一共展示了pChart::AddBorder方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if ($p7 != '' && $n7 != "") {
$Test->setLabel($DataSet->GetData(), $DataSet->GetDataDescription(), "Serie7", $r, $n7, 221, 230, 174);
}
if ($p8 != '' && $n8 != "") {
$Test->setLabel($DataSet->GetData(), $DataSet->GetDataDescription(), "Serie8", $r, $n8, 221, 230, 174);
}
if ($p9 != '' && $n9 != "") {
$Test->setLabel($DataSet->GetData(), $DataSet->GetDataDescription(), "Serie9", $r, $n9, 221, 230, 174);
}
} else {
if ($n0 != "") {
$Test->setLabel($DataSet->GetData(), $DataSet->GetDataDescription(), "Serie2", $r, $n0, 221, 230, 174);
}
}
}
//---------------------------- Legend
if ($legend) {
$Test->setFontProperties("./pChart/Fonts/tahoma.ttf", 9);
$Test->drawLegend($legx, $legy, $DataSet->GetDataDescription(), 240, 240, 240, -1, -1, -1, 90, 90, 90, TRUE);
}
//---------------------------- Border
if ($_GET['border'] == '1') {
$Test->AddBorder(1, 200, 200, 200);
}
//---------------------------- Image PNG
Header("Content-type:image/png");
imagepng($Test->Picture);
//$Test->Render();
//---------------------------- Disconnect
$db->Disconnect();
// closing database connection
示例2: pChart
if (!$width) {
$w = 610;
} else {
$w = (int) $width;
}
if (!$height) {
$h = 210;
} else {
$h = (int) $height;
}
$Test = new pChart($w, $h);
$Test->setColorPalette(0, 255, 255, 255);
$Test->drawGraphAreaGradient(132, 153, 172, 50, TARGET_BACKGROUND);
$Test->setFontProperties("./pChart/Fonts/tahoma.ttf", 8);
$Test->setGraphArea(60, 20, $w - 25, $h - 30);
$Test->drawGraphArea(213, 217, 221, FALSE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_NORMAL, 213, 217, 221, TRUE, 0, 2);
$Test->drawGraphAreaGradient(162, 183, 202, 50);
if (count($values) <= 30) {
$Test->drawGrid(4, TRUE, 230, 230, 230, 20);
}
// Draw the line chart
$Test->drawLineGraph($DataSet->GetData(), $DataSet->GetDataDescription());
//$Test->drawPlotGraph($DataSet->GetData(),$DataSet->GetDataDescription(),2);
// Render the picture
$Test->AddBorder(1);
Header("Content-type:image/png");
imagepng($Test->Picture);
//$Test->Render();
$db->Disconnect();
// closing database connection