addPoints($aD,"%D"); $MyData->addPoints($aK,"%K"); $MyData->addPoints($aR,"RSI"); $MyData->setAxisDisplay(0,AXIS_FORMAT_CURRENCY,""); /* Create the pChart object */ $myPicture = new pImage(1000,600,$MyData); /* Turn of AAliasing */ $myPicture->Antialias = FALSE; /* Draw the border */ $myPicture->drawRectangle(0,0,999,599,array("R"=>0,"G"=>0,"B"=>0)); /* Set the default font settings */ $myPicture->setFontProperties(array("FontName"=>"fonts/pf_arma_five.ttf","FontSize"=>6)); /* Define the chart area */ $myPicture->setGraphArea(60,10,990,580); /* Draw the scale */ $AxisBoundaries = array(0=>array("Min"=>$iMin,"Max"=>$iMax)); $scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,"CycleBackground"=>TRUE,"Mode"=>SCALE_MODE_MANUAL,"ManualScale"=>$AxisBoundaries); $myPicture->drawScale($scaleSettings); $myPicture->drawLegend(95,12,array("Style"=>LEGEND_NOBORDER,"Mode"=>LEGEND_HORIZONTAL)); $myPicture->drawLine(60,125,955,125,array("R"=>167,"G"=>167,"B"=>167,"Ticks"=>4,"Weight"=>0.1)); $myPicture->drawLine(60,467,955,467,array("R"=>167,"G"=>167,"B"=>167,"Ticks"=>4,"Weight"=>0.1)); $myPicture->drawSplineChart(array("DisplayValues"=>TRUE,"DisplayColor"=>DISPLAY_AUTO)); /* Create the pStock object */ $mystockChart = new pStock($myPicture,$MyData); /* Draw the stock chart */ $stockSettings = array("ExtremityLength"=>0,"BoxUpBorderR"=>0, "BoxUpBorderG"=>0, "BoxUpBorderB"=>0,"BoxUpR"=>255,"BoxUpG"=>255,"BoxUpB"=>255,"BoxDownR"=>0,"BoxDownG"=>0,"BoxDownB"=>0); //$myPicture->drawStockChart($stockSettings); /* Render the picture (choose the best way) */ $myPicture->autoOutput("pictures/example.drawStockChart.simple.png"); ?>