// $myPicture->drawGradientArea(0,0,700,20,DIRECTION_VERTICAL,array("StartR"=>0,"StartG"=>0,"StartB"=>0,"EndR"=>50,"EndG"=>50,"EndB"=>50,"Alpha"=>80)); /* Add a border to the picture */ //$myPicture->drawRectangle(800,350,0,0,array("R"=>0,"G"=>0,"B"=>0)); /* Write the chart title */ // $myPicture->setFontProperties(array("FontName"=>"./fonts/simsun.ttc","FontSize"=>8,"R"=>255,"G"=>255,"B"=>255)); //$myPicture->drawText(10,16,"Average recorded temperature",array("FontSize"=>11,"Align"=>TEXT_ALIGN_BOTTOMLEFT)); /* Set the default font */ $myPicture->setFontProperties(array("FontName" => "./fonts/simsun.ttc", "FontSize" => 10, "R" => 0, "G" => 0, "B" => 0)); /* Define the chart area */ $myPicture->drawText(200, 60, $chart_title); $myPicture->setFontProperties(array("FontName" => "./fonts/simsun.ttc", "FontSize" => 8, "R" => 0, "G" => 0, "B" => 0)); $myPicture->setGraphArea(40, 60, 800, 400); /* Draw the scale */ $scaleSettings = array("XMargin" => 10, "YMargin" => 10, "Floating" => TRUE, "GridR" => 200, "GridG" => 200, "GridB" => 200, "Mode" => SCALE_MODE_START0, "DrawSubTicks" => TRUE, "CycleBackground" => TRUE, "LabelRotation" => 45, "LabelSkip" => $row_number / 60); $myPicture->drawScale($scaleSettings); /* Turn on Antialiasing */ $myPicture->Antialias = TRUE; /* Enable shadow computing */ $myPicture->setShadow(TRUE, array("X" => 1, "Y" => 1, "R" => 0, "G" => 0, "B" => 0, "Alpha" => 10)); /* Draw the line chart */ $myPicture->drawLineChart(); //$myPicture->drawPlotChart(array("DisplayValues"=>TRUE,"PlotBorder"=>TRUE,"BorderSize"=>2,"Surrounding"=>-60,"BorderAlpha"=>80)); /* Write the chart legend */ //$myPicture->drawLegend(590,9,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL,"FontR"=>255,"FontG"=>255,"FontB"=>255)); //$myPicture->drawLegend(100,40,array("Style"=>LEGEND_FAMILY_BOX,"Mode"=>LEGEND_VERTICAL)); $myPicture->drawLegend(800, 150, 0, 255, 255, 255); /* Render the picture (choose the best way) */ $myPicture->Revoke(); ?> </body></html>