$cnt = mysql_query("select EXTRACT(DAY from '{$lastdate}') as day"); $rr = mysql_fetch_array($cnt); $cnt = $rr["day"]; for ($i = 1; $i <= $cnt; $i++) { if (!empty($resultarray[$i])) { $arr[] = $resultarray[$i]; } else { $arr[] = 0; } } $barChart = new gBarChart(500, 270); //$barChart-> addAxisRange(0, 0, 100); //$barChart-> addAxisRange(1, 0, 100); $barChart->addDataSet($arr); $barChart->setColors(array("3E832A")); $barChart->setVisibleAxes(array('y')); $barChart->setBarWidth(7, 1); //$barChart->setAutoBarWidth(); ?> <img src="<?php print $barChart->getUrl(); ?> " /> <div class="clr fl bar_graph"> <ul> <?php for ($c = 1; $c <= $cnt; $c++) { ?> <li><?php echo $c;
print "<h3>$year</h3>"; var_dump($months); */ ksort($months); $Chart->addDataSet(array_values($months)); $monthmax = $util->getMaxOfArray($months); if ($monthmax > $max) { $max = $monthmax; } $nummonths = count($months); } $Chart->setLegend(array_keys($chartData)); #$Chart->setBarWidth(4,1,3); $Chart->setAutoBarWidth(); $Chart->setColors(array('ff3344', '11ff11', '22aacc', '3333aa')); $Chart->setVisibleAxes(array('x', 'y')); $Chart->setDataRange(0, $max); $Chart->addAxisRange(0, 1, $nummonths); $Chart->addAxisRange(1, 0, $max); #$lineChart->addBackgroundFill('bg', 'EFEFEF'); #$lineChart->addBackgroundFill('c', '000000'); } print '<div class="tabbed">'; print '<h3>' . $GLOBALS['I18N']->get($item['name']) . '</h3>'; if (!empty($Chart)) { print '<ul>'; print '<li><a href="#graph' . $chartCount . '">Graph</a></li>'; print '<li><a href="#numbers' . $chartCount . '">Numbers</a></li>'; print '</ul>'; } if (!empty($Chart)) {