setRoundedFrame(); # Set the plotarea at (55, 58) and of size 520 x 195 pixels, with white background. # Turn on both horizontal and vertical grid lines with light grey color (0xcccccc) $c->setPlotArea(55, 58, 520, 195, 0xffffff, -1, -1, 0xcccccc, 0xcccccc); # Add a legend box at (50, 30) (top of the chart) with horizontal layout. Use 9 pts # Arial Bold font. Set the background and border color to Transparent. $legendObj = $c->addLegend(50, 30, false, "arialbd.ttf", 9); $legendObj->setBackground(Transparent); # Add a title box to the chart using 15 pts Times Bold Italic font, on a light blue # (CCCCFF) background with glass effect. white (0xffffff) on a dark red (0x800000) # background, with a 1 pixel 3D border. $textBoxObj = $c->addTitle("Application Server Throughput", "timesbi.ttf", 15); $textBoxObj->setBackground(0xccccff, 0x000000, glassEffect()); # Add a title to the y axis $c->yAxis->setTitle("MBytes per hour"); # Set the labels on the x axis. $c->xAxis->setLabels($labels); # Display 1 out of 3 labels on the x-axis. $c->xAxis->setLabelStep(3); # Add a title to the x axis $c->xAxis->setTitle("Jun 12, 2006"); # Add a line layer to the chart $layer = $c->addLineLayer2(); # Set the default line width to 2 pixels $layer->setLineWidth(2); # Add the three data sets to the line layer. For demo purpose, we use a dash line # color for the last line $layer->addDataSet($data0, 0xff0000, "Server #1"); $layer->addDataSet($data1, 0x008800, "Server #2"); $layer->addDataSet($data2, $c->dashLineColor(0x3333ff, DashLine), "Server #3"); # output the chart header("Content-type: image/png"); print($c->makeChart2(PNG)); ?>