<?php /* Updates available at http://www.gummydev.com/ */ require_once 'GummyCharts/GummyCharts.php'; if (array_key_exists('bar', $_REQUEST)) { $BarChart = new BarChart(800, 300); // width, height $BarChart->setBackgroundColor('transparent'); // background color can be transparent $BarChart->setBorderColor('57735b'); $BarChart->setBorderWidth(3); $BarChart->setFontSize(3); // 1 - 5 $BarChart->setFontPosition('inside'); // inside or top $BarChart->addSection(20, '7ca081', 'Look! 20', 'FFFFFF'); // amount, color, text, text color $BarChart->addSection(45, '7ca081', 'This is 45', 'FFFFFF'); $BarChart->addSection(35, '7ca081', 'This one is 35', 'FFFFFF'); $BarChart->addSection(65, '7ca081', 'Here is 65', 'FFFFFF'); $BarChart->generate(); exit; } if (array_key_exists('pie', $_REQUEST)) { $PieChart = new PieChart(400, 400); $PieChart->setBackgroundColor('transparent'); $PieChart->setBorderColor('583a44'); $PieChart->setBorderWidth(2); $PieChart->setFontSize(3); // 1 - 5 // bar chart section amounts should add up to 100 $PieChart->addSection(20, 'ecb5c7', 'Look! 20%', 'FFFFFF'); $PieChart->addSection(35, 'ce9fae', 'This one is 35%', 'FFFFFF'); $PieChart->addSection(45, 'a2848e', 'This is 45%', 'FFFFFF'); $PieChart->generate(); exit; } ?> <img src="<?php echo $_SERVER['PHP_SELF'] ?>?pie" alt="" border="0" /><br /><br /> <img src="<?php echo $_SERVER['PHP_SELF'] ?>?bar" alt="" border="0" /><br /><br />