本文整理汇总了PHP中pChart::drawLine方法的典型用法代码示例。如果您正苦于以下问题:PHP pChart::drawLine方法的具体用法?PHP pChart::drawLine怎么用?PHP pChart::drawLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pChart
的用法示例。
在下文中一共展示了pChart::drawLine方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: pChart
$DataSet->SetYAxisUnit("µm");
// Initialise the graph
$Test = new pChart(380, 400);
$Test->drawGraphAreaGradient(90, 90, 90, 90, TARGET_BACKGROUND);
// Graph area setup
$Test->setFontProperties("Fonts/pf_arma_five.ttf", 6);
$Test->setGraphArea(110, 180, 350, 360);
$Test->drawGraphArea(213, 217, 221, FALSE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_ADDALLSTART0, 213, 217, 221, TRUE, 0, 2, TRUE);
$Test->drawGraphAreaGradient(40, 40, 40, -50);
$Test->drawGrid(4, TRUE, 230, 230, 230, 5);
// Draw the title
$Test->setFontProperties("Fonts/tahoma.ttf", 10);
$Title = " Average growth size for selected\r\n DNA samples ";
$Test->setLineStyle(2);
$Test->drawLine(51, -2, 51, 402, 0, 0, 0);
$Test->setLineStyle(1);
$Test->drawTextBox(0, 0, 50, 400, $Title, 90, 255, 255, 255, ALIGN_BOTTOM_CENTER, TRUE, 0, 0, 0, 30);
$Test->setFontProperties("Fonts/pf_arma_five.ttf", 6);
// Draw the bar graph
$Test->drawStackedBarGraph($DataSet->GetData(), $DataSet->GetDataDescription(), 70);
// Second chart
$DataSet->SetXAxisName("");
$Test->clearScale();
$Test->setGraphArea(110, 20, 350, 140);
$Test->drawGraphArea(213, 217, 221, FALSE);
$Test->drawScale($DataSet->GetData(), $DataSet->GetDataDescription(), SCALE_START0, 213, 217, 221, TRUE, 0, 2);
$Test->drawGraphAreaGradient(40, 40, 40, -50);
$Test->drawGrid(4, TRUE, 230, 230, 230, 5);
// Draw the line chart
$Test->setShadowProperties(0, 3, 0, 0, 0, 30, 4);
示例2: pChart
$hei = 50;
// light/black
if ($black == 1) {
$cbg = 0;
} else {
$cbg = 255;
}
// Object + GraphArea
$Test = new pChart($wid, $hei);
$Test->setGraphArea(0, 0, $wid, $hei);
// Background
$Test->drawBackground($cbg, $cbg, $cbg);
// Draw body
$Test->drawFilledRoundedRectangle(0, 0, 50, 50, 8, $caR, $caG, $caB);
// body
$Test->drawLine(6, 30, 44, 30, 220, 220, 220, FALSE);
// line
// Draw value
$Test->setFontProperties("./pChart/Fonts/tahoma.ttf", 12);
$Test->drawTextBox(8, 10, 45, 23, "{$currentValue}" . "{$unit}", 0, 250, 250, 250, ALIGN_CENTER, FALSE, -1, -1, -1, 100);
// Draw label
$Test->setFontProperties("./pChart/Fonts/tahoma.ttf", 8);
$Test->drawTextBox(8, 32, 42, 46, "{$label}", 0, 250, 250, 250, ALIGN_CENTER, FALSE, -1, -1, -1, 100);
// end of sticker1c
//---------------------------- cloud
} elseif ($objtype == "cloud") {
// Settings
$wid = 50;
$hei = 50;
// light/black
if ($black == 1) {
示例3: drawLine
function drawLine($X1, $Y1, $X2, $Y2, $R, $G, $B, $GraphFunction = FALSE)
{
if (!$this->aliasedGraph) {
imageline($this->Picture, $X1, $Y1, $X2, $Y2, imagecolorallocate($this->Picture, $R, $G, $B));
return;
}
parent::drawLine($X1, $Y1, $X2, $Y2, $R, $G, $B, $GraphFunction);
}
示例4: elseif
//$caR=100;$caG=160;$caB=230;
} elseif ($currentValue == 0) {
$caR = 210 - $k;
$caG = 210 - $k;
$caB = 210 - $k;
} else {
$caR = 200;
$caG = 100;
$caB = 100;
}
// Draw
$Test->drawFilledRectangle($bodyXmin, $bodyYmin, $bodyXmax, $metrYmax, $caR, $caG, $caB);
$Test->drawFilledCircle($metrCenter + 5, $bodyYmin - 10, 13, $caR, $caG, $caB, 0);
$Test->drawFilledCircle($metrCenter + 5, $bodyYmin - 10, 9, $cbody, $cbody, $cbody, 0);
$Test->drawFilledEllipse($metrCenter - 4, $bodyYmin, 16, 30, $caR, $caG, $caB);
$Test->drawLine($bodyXmin + 4, 35, $bodyXmax - 4, 35, $cbody, $cbody, $cbody, FALSE);
$Test->drawLine($bodyXmin + 4, 36, $bodyXmax - 4, 36, $cbody, $cbody, $cbody, FALSE);
$Test->drawLine($bodyXmin - 2, 60, $bodyXmax + 2, 60, $cbody, $cbody, $cbody, FALSE);
$Test->drawLine($bodyXmin - 2, 61, $bodyXmax + 2, 61, $cbody, $cbody, $cbody, FALSE);
$Test->drawLine($bodyXmin - 5, 37, $bodyXmax - 4, 37, $caR, $caG, $caB, FALSE);
$Test->drawLine($bodyXmin - 4, 38, $bodyXmax - 4, 38, $caR, $caG, $caB, FALSE);
$Test->drawLine($bodyXmin - 3, 39, $bodyXmax - 4, 39, $caR, $caG, $caB, FALSE);
$Test->drawLine($bodyXmin - 2, 40, $bodyXmax - 4, 40, $caR, $caG, $caB, FALSE);
$Test->drawLine($bodyXmin - 1, 41, $bodyXmax - 4, 41, $caR, $caG, $caB, FALSE);
// end of kettle1
//-------------------------------------------------------- svet1
} elseif ($objtype == "svet1") {
// Settings
$wid = 90;
$hei = 20;
// light/black