diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-09-12 13:25:05 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-09-12 13:25:05 +0000 |
commit | 4875a716339a15d041d8c4bcddaa0bccaa8a39b6 (patch) | |
tree | 84a8c3a1d8267df3f19ef3cba67e9d36b0aa5598 | |
parent | 8b615404a5fb0d193ad839adc7429d9f99905869 (diff) | |
download | pkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.tar pkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.tar.gz pkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.tar.bz2 pkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.tar.xz pkgsubmit-4875a716339a15d041d8c4bcddaa0bccaa8a39b6.zip |
more concise scale labels
-rw-r--r-- | lib.php | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -490,14 +490,15 @@ S; $rows = array("['Duration', 'Builds']"); foreach ($newdata as $duration => $count) { - if ($duration == '0 second') - $duration = '< 1 minute'; - elseif ($duration == '10 minutes') - $duration = '>= 10 minutes'; - elseif ($duration == '20 minutes') - $duration = '>= 20 minutes'; - elseif ($duration == '60 minutes') - $duration = '> 1 hour'; + + if ($duration == '0 second') { $duration = '<1'; } + elseif ($duration == '10 minutes') { $duration = '>10'; } + elseif ($duration == '20 minutes') { $duration = '>20'; } + elseif ($duration == '60 minutes') { $duration = '>60'; } + else { + $duration = explode(' ', $duration); + $duration = $duration[0]; + } $rows[] = sprintf("['%s', %d]", $duration, $count); } @@ -508,7 +509,7 @@ function draw_buildtime_chart() { {$rows} ]); var options = { - title: 'How long are most of the builds?', + title: 'How long are most of the builds (in minutes)?', hAxis: {title: 'Duration'}, 'width':500, 'height':200, |