<?php include( 'chartlogix.inc.php' ); $chart = new BarChart(); $chart->doBarSeries( 'MP3 Player Sales', 'FFCC00' ); $chart->addData( 'Jan', 191 ); $chart->addData( 'Feb', 217 ); $chart->addData( 'Mar', 178 ); $chart->addData( 'Apr', 263 ); $chart->addData( 'May', 321 ); $chart->doStackedBarSeries( 'Computer Sales', '00CCFF' ); $chart->addData( 'Jan', 201 ); $chart->addData( 'Feb', 292 ); $chart->addData( 'Mar', 249 ); $chart->addData( 'Apr', 320 ); $chart->addData( 'May', 416 ); // Start a new stack by using doBarSeries $chart->doBarSeries( 'Software Sales', '00CC00' ); $chart->addData( 'Jan', 229 ); $chart->addData( 'Feb', 231 ); $chart->addData( 'Mar', 244 ); $chart->addData( 'Apr', 196 ); $chart->addData( 'May', 153 ); // Put this data series onto the new stack $chart->doStackedBarSeries( 'Accessory Sales', 'CC00FF' ); $chart->addData( 'Jan', 113 ); $chart->addData( 'Feb', 105 ); $chart->addData( 'Mar', 96 ); $chart->addData( 'Apr', 101 ); $chart->addData( 'May', 94 ); $chart->drawPNG( 500, 400 );
|