setPlotArea(40, 60, 525, 200, 0xffffff, -1, -1, 0xcccccc, 0xcccccc); $c->yAxis->setTitle("KEUROS"); $c->xAxis->setTitle( "<*block,valign=absmiddle*>Années<*/*>"); $c->xAxis->setWidth(2); $c->yAxis->setWidth(2); // Add a legend box at (55, 32) (top of the chart) with horizontal layout. Use 9 pts // Arial Bold font. Set the background and border color to Transparent. $legendObj = $c->addLegend(55, 0, false, "arialbd.ttf", 9); $legendObj->setBackground(Transparent); // Add a blue (0000ff) step line layer to the chart and set the line width to 2 pixels $layer1 = $c->addStepLineLayer($dataY1, 0x0000ff, "FONDS DE ROULEMENT"); $layer1->setXData($dataX1); $layer1->setLineWidth(2); // Add a red (ff0000) step line layer to the chart and set the line width to 2 pixels $layer0 = $c->addStepLineLayer($dataY0, 0xff0000, "BESOIN EN FONDS DE ROULEMENT"); $layer0->setXData($dataX0); $layer0->setLineWidth(2); // Add a black (000000) step line layer to the chart and set the line width to 2 pixels $layer2 = $c->addStepLineLayer($dataY2, 0x000000, "CHIFFRE D'AFFAIRES"); $layer2->setXData($dataX2); $layer2->setLineWidth(2); # If the FR line gets above the BFR line, color to area between the lines red (ff0000) $c->addInterLineLayer($layer0->getLine(0), $layer1->getLine(0), 0xff0000, Transparent); # If the FR line gets below the lower BFR line, color to area between the lines light green (8099ff99) $c->addInterLineLayer($layer0->getLine(0), $layer1->getLine(0), Transparent, 0x8099ff99); // output the chart header("Content-type: image/png"); print($c->makeChart2(PNG)); ?>