当前位置: 首页>>代码示例>>PHP>>正文


PHP pImage::drawsplineChart方法代码示例

本文整理汇总了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";
开发者ID:rafaelurrutia,项目名称:bmonitor-y-bi,代码行数:31,代码来源:FFT.php


注:本文中的pImage::drawsplineChart方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。