improve tag cloud font size scaling
* use logarithmic scales * remove bold style
This commit is contained in:
parent
132acc4e95
commit
4c6847df8b
1 changed files with 2 additions and 2 deletions
|
@ -1329,9 +1329,9 @@ function renderPage()
|
||||||
ksort($tags);
|
ksort($tags);
|
||||||
$tagList=array();
|
$tagList=array();
|
||||||
foreach($tags as $key=>$value)
|
foreach($tags as $key=>$value)
|
||||||
|
// Tag font size scaling: default 15 and 30 logarithm bases affect scaling, 22 and 6 are arbitrary font sizes for max and min sizes.
|
||||||
{
|
{
|
||||||
//$tagList[$key] = array('count'=>$value,'size'=>max(40*$value/$maxcount,8));
|
$tagList[$key] = array('count'=>$value,'size'=>log($value, 5) / log($maxcount, 3) * (4.8-0.8) + 0.8);
|
||||||
$tagList[$key] = array('count'=>$value,'size'=>round(min(max($maxcount*$value/$linkCount,0.8),4.5),2), 'max'=>$maxcount);
|
|
||||||
}
|
}
|
||||||
$PAGE = new pageBuilder;
|
$PAGE = new pageBuilder;
|
||||||
$PAGE->assign('linkcount',count($LINKSDB));
|
$PAGE->assign('linkcount',count($LINKSDB));
|
||||||
|
|
Loading…
Reference in a new issue