<?php include( 'chartlogix.inc.php' ); $chart = new BarChart(); $chart->setLegendWidth( 30 ); $chart->setXAxisTitleStyle( 'arial.ttf', 10, 'CC0000' ); $chart->setYAxisTitleStyle( 'arial.ttf', 20, '009900' ); $chart->setLeftAxisTitle( 'MP3 Player Sales' ); $chart->setBottomAxisTitle( 'Months in 2008' ); $chart->setStackedBarOverlap( 50 ); $chart->doBarSeries( 'Birmingham', 'FFCC00', 'EEAA00' ); $chart->addData( 'Jan', -61 ); $chart->addData( 'Feb', -22 ); $chart->addData( 'Mar', 37 ); $chart->addData( 'Apr', 98 ); $chart->addData( 'May', 54 ); $chart->doStackedBarSeries( 'London', 'CCDDFF', 'AABBEE' ); $chart->addData( 'Jan', -10 ); $chart->addData( 'Feb', 21 ); $chart->addData( 'Mar', -60 ); $chart->addData( 'Apr', 10 ); $chart->addData( 'May', -5 ); $chart->doBarSeries( 'Manchester', 'CC99FF', 'AA77EE' ); $chart->addData( 'Jan', 32 ); $chart->addData( 'Feb', -22 ); $chart->addData( 'Mar', 31 ); $chart->addData( 'Apr', -29 ); $chart->addData( 'May', 39 ); $chart->doStackedBarSeries( 'Cambridge', 'CCCCCC', 'AAAAAA' ); $chart->addData( 'Jan', 34 ); $chart->addData( 'Feb', 29 ); $chart->addData( 'Mar', 12 ); $chart->addData( 'Apr', 3 ); $chart->addData( 'May', -8 ); $chart->doLineSeries( 'Profit', '66EE66' ); $chart->setLineStyle( 6, 6 ); $chart->addData( 'Jan', 100 ); $chart->addData( 'Feb', -75 ); $chart->addData( 'Mar', 50 ); $chart->addData( 'Apr', -25 ); $chart->addData( 'May', 0 ); $chart->drawPNG( 500, 400 );
|