Skip to content
Snippets Groups Projects
Commit 0003f8dd authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Fix bug with axis labeling..

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1333 44740490-163a-0410-bde0-09ae8108e29a
parent bce862ae
No related branches found
No related tags found
No related merge requests found
...@@ -153,8 +153,7 @@ $summaryDataset = array_reverse($summaryDataset, TRUE); ...@@ -153,8 +153,7 @@ $summaryDataset = array_reverse($summaryDataset, TRUE);
$datasets = array(); $datasets = array();
$axis = array();
$axispos = array();
#$max = 25; #$max = 25;
$availdelimiters = array(); $availdelimiters = array();
$xentries = count($results); $xentries = count($results);
...@@ -168,7 +167,10 @@ function getPercentValues($results, $delimiter) { ...@@ -168,7 +167,10 @@ function getPercentValues($results, $delimiter) {
#echo('<pre>'); print_r($results); exit; #echo('<pre>'); print_r($results); exit;
global $slot, $slotsize, $dateformat_intra, $axis, $axispos, $availdelimiters, $max, $datehandler, $axislabelint, $i, $xentries; global $slot, $slotsize, $dateformat_intra, $axis, $lastslot, $axispos, $availdelimiters, $max, $datehandler, $axislabelint, $i, $xentries;
$axis = array();
$axispos = array();
$dataset = array(); $dataset = array();
foreach($results AS $slot => $res) { foreach($results AS $slot => $res) {
...@@ -184,7 +186,7 @@ function getPercentValues($results, $delimiter) { ...@@ -184,7 +186,7 @@ function getPercentValues($results, $delimiter) {
if ( $slot % $axislabelint == 0) { if ( $slot % $axislabelint == 0) {
$axis[] = $datehandler->prettyDateSlot($slot, $slotsize, $dateformat_intra); $axis[] = $datehandler->prettyDateSlot($slot, $slotsize, $dateformat_intra);
$axispos[] = (($i)/($xentries-1)); $axispos[] = (($i)/($xentries-1));
#echo 'set axis on [' . $slot . ']'; // echo 'set axis on [' . $slot . '] = [' . $datehandler->prettyDateSlot($slot, $slotsize, $dateformat_intra) . ']';
} }
$lastslot = $slot; $lastslot = $slot;
$i++; $i++;
...@@ -194,6 +196,8 @@ function getPercentValues($results, $delimiter) { ...@@ -194,6 +196,8 @@ function getPercentValues($results, $delimiter) {
} }
$datasets[] = getPercentValues($results, '_'); $datasets[] = getPercentValues($results, '_');
if ($delimiter !== '_') { if ($delimiter !== '_') {
if (array_key_exists('graph.total', $statrules[$rule]) && $statrules[$rule]['graph.total'] === TRUE) { if (array_key_exists('graph.total', $statrules[$rule]) && $statrules[$rule]['graph.total'] === TRUE) {
...@@ -205,6 +209,7 @@ if ($delimiter !== '_') { ...@@ -205,6 +209,7 @@ if ($delimiter !== '_') {
$axis[] = $datehandler->prettyDateSlot($lastslot+1, $slotsize, $dateformat_intra); $axis[] = $datehandler->prettyDateSlot($lastslot+1, $slotsize, $dateformat_intra);
#print_r($axis); #print_r($axis);
#echo('<pre>'); print_r($axis); exit;
$dimx = $statconfig->getValue('dimension.x', 800); $dimx = $statconfig->getValue('dimension.x', 800);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment