From 1f5d518d8cd2f827a941aa8ae313d6b6690a5df3 Mon Sep 17 00:00:00 2001 From: Andre Lorbach Date: Tue, 9 Sep 2008 16:01:26 +0200 Subject: [PATCH] made some adjustments to the horizontal bar chart --- src/chartgenerator.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/chartgenerator.php b/src/chartgenerator.php index 6b4f14e..d0d1475 100644 --- a/src/chartgenerator.php +++ b/src/chartgenerator.php @@ -291,7 +291,7 @@ if ( !$content['error_occured'] ) $graph = new Graph($content['chart_width'], $content['chart_width'], 'auto'); // $graph->SetMargin(60,20,30,50); $graph->SetScale("textlin"); - $graph->Set90AndMargin(80,20,30,50); // Adjust margin area + $graph->Set90AndMargin(80,30,30,50); // Adjust margin area $graph->SetMarginColor('white'); $graph->SetBox(); // Box around plotarea @@ -302,11 +302,12 @@ if ( !$content['error_occured'] ) $graph->xaxis->SetLabelAngle(0); // $graph->xaxis->SetLabelAlign('center','top'); $graph->xaxis->SetPos('min'); + $graph->xaxis->SetLabelMargin(5); + $graph->xaxis->SetLabelAlign('right','center'); // Setup Y-AXIS $graph->yaxis->SetFont(FF_ARIAL,FS_NORMAL,8); $graph->yaxis->scale->SetGrace(10); // So the value is readable -// $graph->yaxis->SetLabelFormat('%d %%'); $graph->yaxis->SetLabelAlign('center','top'); $graph->yaxis->SetLabelFormat('%d'); $graph->yaxis->SetLabelSide(SIDE_RIGHT); @@ -321,7 +322,8 @@ if ( !$content['error_occured'] ) // Setup the tab title $graph->tabtitle->Set( GetAndReplaceLangStr($content['LN_STATS_COUNTBY'], $content[ $fields[$content['chart_field']]['FieldCaptionID'] ]) . " - " . GetAndReplaceLangStr($content['LN_STATS_TOPRECORDS'], $content['maxrecords']) ); $graph->tabtitle->SetFont(FF_ARIAL,FS_BOLD,10); - $graph->tabtitle->SetPos('left'); + $graph->tabtitle->SetPos('right'); + $graph->tabtitle->SetTabAlign('right'); // Set Graph footer $graph->footer->left->Set ("phpLogCon v" . $content['BUILDNUMBER'] );