billing fixes and improvements

git-svn-id: http://www.observium.org/svn/observer/trunk@2764 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-12-07 13:52:46 +00:00
parent 810788fd84
commit d0cee15757
7 changed files with 67 additions and 71 deletions

View File

@ -147,9 +147,6 @@
$ave_count = count($tot_data);
}
$decimal = 0;
# $in_data = formatScale($in_data, $max, $decimal);
# $out_data = formatScale($out_data, $max, $decimal);
# $tot_data = formatScale($tot_data, $max, $decimal);
$average = $average / $ave_count;
for ($x=0;$x<=count($tot_data);$x++) {
array_push($ave_data, $average);
@ -161,8 +158,11 @@
// Create the graph. These two calls are always required
$graph = new Graph($xsize, $ysize, $graph_name);
$graph->img->SetImgFormat("png");
# $graph->SetScale("textlin",0,0,$start,$end);
$graph->SetScale("textlin");
$graph->title->Set("$graph_name");
#$graph->title->Set("$graph_name");
$graph->title->SetFont(FF_FONT2, FS_BOLD, 10);
$graph->SetMarginColor("white");
$graph->SetFrame(false);
@ -189,8 +189,8 @@
// Create the bar plots
$barplot_tot = new BarPlot($tot_data);
$barplot_tot->SetLegend("Traffic total");
$barplot_tot->SetColor("#d5d5d5");
$barplot_tot->SetFillColor("#d5d5d5@0.5");
$barplot_tot->SetColor("darkred");
$barplot_tot->SetFillColor("lightred@0.4");
$barplot_tot->value->Show();
$barplot_tot->value->SetFormatCallback('format_bytes_billing_short');