<? include( 'chartlogix.inc.php' ); $bar = new BarChart(); //---- THE STYLE $bar->setBackground( 'DDEEFF', 'BBCCFF' ); $bar->setPadding( 20 ); $bar->setDefaultFont( 'arial.ttf' ); $bar->setTitleStyle( 'arial.ttf', 15, '000000' ); $bar->setTitlePosition( 0, 0 ); $bar->setLegendWidth( 30.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', 30 ); $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->doLineSeries( 'Bananas', 'FFCC00' ); $bar->setLineStyle( 4, 9 ); $bar->setValueStyle(); $bar->addData( '2002', 1377 ); $bar->addData( '2003', 1703 ); $bar->addData( '2004', 1469 ); $bar->addData( '2005', 1828 ); $bar->addData( '2006', 1458 ); $bar->addData( '2007', 1955 ); $bar->doLineSeries( 'Apples', '66CC00' ); $bar->setLineStyle( 4, 9 ); $bar->setValueStyle(); $bar->addData( '2002', 1232 ); $bar->addData( '2003', 1028 ); $bar->addData( '2004', 1376 ); $bar->addData( '2005', 1093 ); $bar->addData( '2006', 1246 ); $bar->addData( '2007', 1107 ); $bar->doLineSeries( 'Strawberries', 'CC0000' ); $bar->setLineStyle( 4, 9 ); $bar->setValueStyle(); $bar->addData( '2002', 420 ); $bar->addData( '2003', 460 ); $bar->addData( '2004', 954 ); $bar->addData( '2005', 687 ); $bar->addData( '2006', 391 ); $bar->addData( '2007', 825 ); $bar->doLineSeries( 'Plums', '9900FF' ); $bar->setLineStyle( 4, 9 ); $bar->setValueStyle(); $bar->addData( '2002', 309 ); $bar->addData( '2003', 206 ); $bar->addData( '2004', 375 ); $bar->addData( '2005', 326 ); $bar->addData( '2006', 326 ); $bar->addData( '2007', 304 ); //---- DRAW PNG $bar->drawPNG( 500, 400 ); ?>