本文整理汇总了PHP中pImage::drawsplineChart方法的典型用法代码示例。如果您正苦于以下问题:PHP pImage::drawsplineChart方法的具体用法?PHP pImage::drawsplineChart怎么用?PHP pImage::drawsplineChart使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pImage
的用法示例。
在下文中一共展示了pImage::drawsplineChart方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
//$myPicture->drawFilledRectangle(0,0,1024,400,array("R"=>47,"G"=>126,"B"=>216,"Surrounding"=>-200,"Alpha"=>80));
/* Write the chart title */
$Settings = array("R" => 179, "G" => 217, "B" => 91, "Dash" => 1, "DashR" => 199, "DashG" => 237, "DashB" => 111);
$myPicture->drawFilledRectangle(0, 0, $W, 400, $Settings);
$Settings = array("StartR" => 194, "StartG" => 231, "StartB" => 44, "EndR" => 43, "EndG" => 107, "EndB" => 58, "Alpha" => 50);
$myPicture->drawGradientArea(60, 40, $W - 20, 380, DIRECTION_VERTICAL, $Settings);
//$myPicture->drawGradientArea(60,40,1010,380,DIRECTION_VERTICAL,array("StartR"=>0,"StartG"=>0,"StartB"=>0,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>100));
$myPicture->setFontProperties(array("FontName" => "pChart/fonts/Forgotte.ttf", "FontSize" => 11));
$myPicture->drawText(150, 35, "Average temperature", array("FontSize" => 20, "Align" => TEXT_ALIGN_BOTTOMMIDDLE));
/* Set the default font */
$myPicture->setFontProperties(array("FontName" => "pChart/fonts/pf_arma_five.ttf", "FontSize" => 6));
/* Define the chart area */
$myPicture->setGraphArea(60, 40, $W - 20, 380);
/* Draw the scale */
$scaleSettings = array("LabelSkip" => round(count($data1) / 10), "DrawXLines" => TRUE, "XMargin" => 10, "YMargin" => 10, "Floating" => TRUE, "GridR" => 200, "GridG" => 200, "GridB" => 200, "DrawSubTicks" => FALSE, "CycleBackground" => TRUE);
$myPicture->drawScale($scaleSettings);
/* Turn on Antialiasing */
$myPicture->Antialias = TRUE;
/* Draw the line chart */
$myPicture->drawsplineChart();
$myPicture->drawPlotChart();
/* Write the chart legend */
$myPicture->drawLegend(540, 20, array("Style" => LEGEND_BOX, "Mode" => LEGEND_HORIZONTAL));
//$myPicture->drawScale(array("AutoAxisLabels"=>TRUE,"Pos"=>SCALE_POS_TOPBOTTOM));
/* Render the picture (choose the best way) */
// $myPicture->autoOutput("simple2.png");
ob_start();
imagepng($myPicture->Picture);
$contents = ob_get_contents();
ob_end_clean();
print "<img src='data:image/png;base64," . base64_encode($contents) . "' />\n";