$x_horiz_labels[] = "No results found"; $title = "$topx $limit $propername Report\nNo results match your search criteria"."\n" ; } /** * CREATED BY: WESAM GERGES * DATE: 12-04-2011 * */ // Chart Options if($chart_type != 'line' && $chart_type != 'pie') $chart_type = 'column'; $tchart = new jqNewChart($chart_type,$dotValues,$title,"$topx $limit $propername ",$x_horiz_labels); $tchart->setXAxisData($x_horiz_labels); $tchart->setTooltip("return '<b>'+ this.x +'</b><br> '+ addCommas(this.point.y) +' <br/> ".$topx.' '. $limit.' '. $propername."'"); $tchart->setTitleMargin(30); echo $tchart->renderChart("chart_adhoc"); } // ------------------------------------------------------ // END Chart Generation // ------------------------------------------------------ ?> <script type="text/javascript"> var targets = {"Hosts":"hosts","Programs":"programs","Messages":"msg_mask","Facilities":"facilities","Severities":"severities","Mnemonics":"mnemonics","EventId":"eids"}; var targets2 = {"Hosts":"sel_hosts","Programs":"programs","Messages":"msg_mask","Facilities":"facilities","Severities":"severities","Mnemonics":"sel_mne","EventId":"sel_eid"};
function mmo() { $chartId = "chart_mmo"; $title = "Last 12 months"; $data = get_data(12, 60 * 60 * 24 * 31, 'monthly'); $values = array(); $labels = array(); foreach ($data as $ts => $v) { $values[] = $v; $labels[] = strftime("%b %Y", $ts); } $tchart = new jqNewChart("column", $values, $title, " ", $labels); $tchart->setXAxisData($labels); $tchart->setTooltip(" return this.x.replace('</b><br>','</b> - ') " . "+ ' <br/> '+humanReadable(this.y) + ' events'"); echo $tchart->renderChart($chartId); }