<? 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', 1759 ); $bar->addData( '2003', 1016 ); $bar->addData( '2004', 1604 ); $bar->addData( '2005', 664 ); $bar->addData( '2006', 354 ); $bar->addData( '2007', 903 ); $bar->doStackedBarSeries( 'Apples', '99FF00', '66CC00' ); $bar->setValueStyle(); $bar->addData( '2002', 600 ); $bar->addData( '2003', 1641 ); $bar->addData( '2004', 201 ); $bar->addData( '2005', 1261 ); $bar->addData( '2006', 942 ); $bar->addData( '2007', 1337 ); $bar->doStackedBarSeries( 'Strawberries', 'FF7777', 'FF0000' ); $bar->setValueStyle(); $bar->addData( '2002', 218 ); $bar->addData( '2003', 463 ); $bar->addData( '2004', 495 ); $bar->addData( '2005', 273 ); $bar->addData( '2006', 112 ); $bar->addData( '2007', 476 ); //---- DRAW PNG $bar->drawPNG( 500, 400 ); ?>