<? include( 'chartlogix.inc.php' ); $bar = new BarChart(); //---- THE STYLE $bar->setBackground( 'EEEEEE', 'EEEEEE' ); $bar->setPadding( 20 ); $bar->setDefaultFont( 'arial.ttf' ); $bar->setTitleStyle( 'arial.ttf', 15, '000000' ); $bar->setTitlePosition( 0, 0 ); $bar->setLegendWidth( 40.00 ); $bar->setLegendTextStyle( 'arial.ttf', 10, '000000', 10 ); $bar->setLegendKeyStyle( 10, 10 ); $bar->setLegendBoxStyle( 'FFFFFF', '000000', 10 ); $bar->setLegendPosition( 1, 0 ); $bar->setXAxisTextStyle( 'arial.ttf', 10, '000000', 0 ); $bar->setYAxisTextStyle( 'arial.ttf', 10, '000000' ); $bar->setColumnSpacing( 25 ); $bar->setStackedBarSpacing( 0 ); //---- THE DATA $bar->setTitle( 'ChartLogix Bar & Line Graph' ); $bar->addColumns( array( '2002', '2003', '2004', '2005', '2006', '2007' ) ); $bar->doBarSeries( 'Bananas', 'FFFF00', 'FFCC00' ); $bar->setValueStyle(); $bar->addData( '2002', 1512 ); $bar->addData( '2003', 452 ); $bar->addData( '2004', 299 ); $bar->addData( '2005', 626 ); $bar->addData( '2006', 1658 ); $bar->addData( '2007', 1942 ); $bar->doStackedBarSeries( 'Apples', '99FF00', '66CC00' ); $bar->setValueStyle(); $bar->addData( '2002', 1760 ); $bar->addData( '2003', 522 ); $bar->addData( '2004', 347 ); $bar->addData( '2005', 1781 ); $bar->addData( '2006', 1401 ); $bar->addData( '2007', 775 ); $bar->doStackedBarSeries( 'Strawberries', 'FF7777', 'FF0000' ); $bar->setValueStyle(); $bar->addData( '2002', 433 ); $bar->addData( '2003', 486 ); $bar->addData( '2004', 438 ); $bar->addData( '2005', 396 ); $bar->addData( '2006', 409 ); $bar->addData( '2007', 318 ); //---- DRAW PNG $bar->drawPNG( 500, 400 ); ?>