Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixes #2636
git-svn-id: http://dev.piwik.org/svn/trunk@5237 59fd770c-687e-43c8-a1e3-f5a4ff64c105
  • Loading branch information
mattab committed Sep 27, 2011
1 parent 419b316 commit 06cc2d3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion core/Visualization/Cloud.php
Expand Up @@ -56,7 +56,16 @@ public function render()
{
$wordTruncated = substr($word, 0, $this->truncatingLimit - 3).'...';
}
$percent = ($popularity / $maxValue) * 100;

// case hideFutureHoursWhenToday=1 shows hours with no visits
if($maxValue == 0)
{
$percent = 0;
}
else
{
$percent = ($popularity / $maxValue) * 100;
}
// CSS style value
$sizeRange = $this->getClassFromPercent($percent);

Expand Down

0 comments on commit 06cc2d3

Please sign in to comment.