setPlotArea(50, 25, 500, 250); $plotAreaObj->setGridColor(0xc0c0c0, 0xc0c0c0); # Add a title to the chart $c->addTitle("Universal Stock Index on Jan 2001"); # Add a custom text at (50, 25) (the upper left corner of the plotarea). Use 12 pts # Arial Bold/blue (4040c0) as the font. $c->addText(50, 25, "(c) Global XYZ ABC Company", "arialbd.ttf", 12, 0x4040c0); # Add a title to the x axis $c->xAxis->setTitle("Jan 2001"); # Set the labels on the x axis. Rotate the labels by 45 degrees. $labelsObj = $c->xAxis->setLabels($labels); $labelsObj->setFontAngle(45); # Add a title to the y axis $c->yAxis->setTitle("Universal Stock Index"); # Draw the y axis on the right hand side of the plot area $c->setYAxisOnRight(true); # Add a HLOC layer to the chart using green (008000) for up days and red (ff0000) for # down days $layer = $c->addHLOCLayer3($highData, $lowData, $openData, $closeData, 0x008000, 0xff0000); # Set the line width to 2 pixels $layer->setLineWidth(2); # output the chart header("Content-type: image/png"); print($c->makeChart2(PNG)); ?>