/* * Chart */ if (count($res_hits)) { $last_date = 0; $chart['chart_data'][0] = array(); $chart['chart_data'][1] = array(); $count = 0; foreach ($res_hits as $row_stats) { $this_date = mktime(0, 0, 0, $row_stats['month'], $row_stats['day'], $row_stats['year']); if ($last_date != $this_date) { // We just hit a new day, let's display the previous one: $last_date = $this_date; // that'll be the next one $count++; array_unshift($chart['chart_data'][0], date(locale_datefmt(), $last_date)); array_unshift($chart['chart_data'][1], 0); } $chart['chart_data'][1][0] = $row_stats['hits']; } array_unshift($chart['chart_data'][0], ''); array_unshift($chart['chart_data'][1], 'XML (RSS/Atom) hits'); // Translations need to be UTF-8 // Include common chart properties: require dirname(__FILE__) . '/inc/_bar_chart.inc.php'; $chart['series_color'] = array($agent_type_color['rss']); echo '<div class="center">'; load_funcs('_ext/_swfcharts.php'); DrawChart($chart); echo '</div>'; }
function delivery_chart($blast_ID) { $chart['canvas_bg'] = array('width' => 400, 'height' => 300, 'color' => "666666"); $chart['chart_bg'] = array('positive_color' => "ffffff", 'positive_alpha' => 20, 'negative_color' => "ff0000", 'negative_alpha' => 10); $chart['chart_data'] = array(array("New", "Pending", "Sending", "Done", "In-Progress", "Bad Address", "Bounced", "Server Failure", "Delayed", "Testing"), array(get_count($blast_ID, 'New'), get_count($blast_ID, 'Pending'), get_count($blast_ID, 'Sending'), get_count($blast_ID, 'Done'), get_count($blast_ID, 'In-Progress'), get_count($blast_ID, 'Bad Address'), get_count($blast_ID, 'Bounced'), get_count($blast_ID, 'Server Failure'), get_count($blast_ID, 'Delayed'), get_count($blast_ID, 'Testing'))); $chart['chart_grid'] = array('alpha' => 10, 'color' => "000000", 'horizontal_thickness' => 1, 'vertical_thickness' => 0, 'horizontal_skip' => 0, 'vertical_skip' => 0); $chart['chart_type'] = "pie"; $chart['chart_value'] = array('color' => "ffffff", 'alpha' => 90, 'font' => "arial", 'bold' => true, 'size' => 10, 'position' => "inside", 'prefix' => "", 'suffix' => "", 'decimals' => 0, 'separator' => "", 'as_percentage' => true); $chart['draw_text'] = array(array('color' => "000000", 'alpha' => 10, 'font' => "arial", 'rotation' => 0, 'bold' => true, 'size' => 30, 'x' => 0, 'y' => 140, 'width' => 400, 'height' => 150, 'text' => "|||||||||||||||||||||||||||||||||||||||||||||||", 'h_align' => "center", 'v_align' => "bottom")); $chart['legend_bg'] = array('bg_color' => "ffffff", 'bg_alpha' => 10, 'border_color' => "000000", 'border_alpha' => 0, 'border_thickness' => 0); $chart['legend_label'] = array('layout' => "horizontal", 'bullet' => "circle", 'font' => "arial", 'bold' => true, 'size' => 13, 'color' => "ffffff", 'alpha' => 85); $chart['series_color'] = array("4d4d4d", "ddaa41", "88dd11", "4e62dd", "ff8811", "FF0000", "5a4b6e", "FFFF00", "000066", "CCCCCC"); $chart['series_explode'] = array(20, 0, 50); DrawChart($chart); }