private function normalizeTagCounts( &$tagsArray, $tagCounts )
    {
        $maxFontSize = 200;
        $minFontSize = 100;

        $maxCount = max( $tagCounts );
        $minCount = min( $tagCounts );

        $spread = $maxCount - $minCount;
        if ( $spread == 0 )
            $spread = 1;

        $step = ( $maxFontSize - $minFontSize ) / ( $spread );

        foreach ( $tagsArray as $index => $tagItem )
        {
            $tagsArray[$index]['font_size'] = $minFontSize + ( ( $tagItem['count'] - $minCount ) * $step );
        }
    }
private function normalizeTagCounts( &$tagsArray, $tagCounts )
    {
        $maxFontSize = 200;
        $minFontSize = 100;

        $maxCount = max( $tagCounts );
        $minCount = min( $tagCounts );

        $spread = $maxCount - $minCount;
        if ( $spread == 0 )
            $spread = 1;

        $step = ( $maxFontSize - $minFontSize ) / ( $spread );

        foreach ( $tagsArray as $index => $tagItem )
        {
            $tagsArray[$index]['font_size'] = $minFontSize + ( ( $tagItem['count'] - $minCount ) * $step );
        }
    }
private function normalizeTagCounts ( & $ tagsArray , $ tagCounts ) { $ maxFontSize = 200 ; $ minFontSize = 100 ; $ maxCount = max ( $ tagCounts ) ; $ minCount = min ( $ tagCounts ) ; $ spread = $ maxCount - $ minCount ; if ( $ spread == 0 ) $ spread = 1 ; $ step = ( $ maxFontSize - $ minFontSize ) / ( $ spread ) ; foreach ( $ tagsArray as $ index => $ tagItem ) { $ tagsArray [ $ index ] [ 'font_size' ] = $ minFontSize + ( ( $ tagItem [ 'count' ] - $ minCount ) * $ step ) ; } }
Normalizes the count of tags to be able to be displayed properly on the page

@param array $tagsArray
@param array $tagCounts
Normalizes the count of tags to be able to be displayed properly on the page