addPoints($values,'serie1'); if ($x_array !== NULL) { $MyData->addPoints($x_array,'serie2'); $MyData->setAbscissa('serie2'); } $myPicture = new pImage($width,$height,$MyData); $myPicture->setFontProperties(array( 'FontName' => dirname(__FILE__) . '/pChart/fonts/calibri.ttf', 'FontSize' => 10 )); /* Draw the scale */ $myPicture->setGraphArea(50, 30, $width - 20, $height - 30); $myPicture->drawRoundedFilledRectangle( 7, 7, $width - 7, $height - 7, 5, array('R' => 245, 'G' => 245, 'B' => 240) ); $myPicture->drawRoundedRectangle( 5, 5, $width - 5, $height - 5, 5, array('R' => 230,'G' => 230,'B' => 230) ); $myPicture->drawScale(array( 'Mode' => SCALE_MODE_START0, 'CycleBackground' => TRUE, 'DrawSubTicks' => TRUE, 'GridR' => 200, 'GridG' => 200, 'GridB' => 200) ); /* Turn on shadow computing */ $myPicture->setShadow( FALSE, array('X' => 1,'Y' => 1,'R' => 0,'G' => 0,'B' => 0,'Alpha' => 10) ); /* Draw the chart */ $settings = array( 'Gradient' => TRUE, 'DisplayPos' => LABEL_POS_INSIDE, 'DisplayValues' => FALSE, 'DisplayR' => 255, 'DisplayG' => 255, 'DisplayB' => 255, 'DisplayShadow' => TRUE, 'Surrounding' => 10 ); $myPicture->drawBarChart($settings); /* Render the picture (choose the best way) */ $myPicture->autoOutput(); exit(); }