setPlotArea(55, 45, 420, 210, 0xffffff, -1, -1, 0xc0c0c0, -1); # Add a legend box at (55, 25) (top of the chart) with horizontal layout. Use 8 pts # Arial font. Set the background and border color to Transparent. $legendObj = $c->addLegend(55, 22, false, "", 8); $legendObj->setBackground(Transparent); # Add a title box to the chart using 13 pts Times Bold Italic font. The text is white # (0xffffff) on a purple (0x800080) background, with a 1 pixel 3D border. $textBoxObj = $c->addTitle("Long Term Server Load", "timesbi.ttf", 13, 0xffffff); $textBoxObj->setBackground(0x800080, -1, 1); # Add a title to the y axis $c->yAxis->setTitle("MBytes"); # Set the labels on the x axis. Rotate the font by 90 degrees. $labelsObj = $c->xAxis->setLabels($labels); $labelsObj->setFontAngle(90); # Add a line layer to the chart $lineLayer = $c->addLineLayer(); # Add the data to the line layer using light brown color (0xcc9966) with a 7 pixel # square symbol $dataSetObj = $lineLayer->addDataSet($data, 0xcc9966, "Server Utilization"); $dataSetObj->setDataSymbol(SquareSymbol, 7); # Set the line width to 2 pixels $lineLayer->setLineWidth(2); # Add a trend line layer using the same data with a dark green (0x008000) color. Set # the line width to 2 pixels $trendLayerObj = $c->addTrendLayer($data, 0x008000, "Trend Line"); $trendLayerObj->setLineWidth(2); # output the chart header("Content-type: image/png"); print($c->makeChart2(PNG)); ?>